This would probably be better suited for the SF forum as there are a few threads like this over there.
If you're not checking bags, you'll be fine. If you are, it will be a bit tight, but still doable (This is assuming you're on AC or UA, which fly out of T3).
You will clear immigration and customs. You'll then have to clear security and re-enter the terminal. Canada flights depart from domestic terminals, and as I mentioned it's T3 for UA and AC.
If your flight is late, all bets are off. Case in point my SFO-YVR flight this morning had about 14 pax from last night's FRA-SFO which was delayed by wx.
Which airline(s) are involved?
Is this all on the same ticket?
Good luck.