While Assists are not part of the Laws of the Game there are a few points to be considered, but they may vary in different competitions.
According to Wikipedia this is being used for World Cups:
- An assist was awarded to the player who had given the last pass to the goalscorer.
- In addition, also the last but two holder of the ball could get an assist provided that his action had decisive importance for the goal .
- After goals from rebounds those players were awarded an assist who had shot on target.
- After goals scored on penalty or by a directly converted free-kick the fouled player received a point.
- In case that the goalscorer had laid on the goal for himself (dribble, solo run), no assists were awarded.
- No assists were awarded, either, if the goalscorer took advantage of a missed pass by an opponent.
So, assuming the info above is correct...
Situation 1: Yes, it's an assist
The goalscorer received the pass and scored. The first criterion is met since it was the last pass before they scored that goal.
Additionally the 2nd criterion can be met, if the pass was important for that situation. The goal scorer assisted himself (3rd), but the pass was important enough to still award an assist point.
Situation 2: Yes, it's an assist
Regardless of how far the ball was deflected and who did it the pass was still important enough.
If the deflection was not far enough to count as (own) goal for that guy the striker would receive the goal point, thus granting the passer that assist (1st). And if the goal counts for the deflecting player, the striker and passer may receive an assist (1st and 2nd criteria).