Now I'm a little confused. (prior to your edit) I guess it goes something like this.
Riker-AGT II (future)
So with that line of thinking, it should be Jelico.
Where do you draw the line, though? Command doesn't really shift every time the captain leaves the ship and leaves somebody else in charge. (Even if circumstances prevent him returning, like in "Descent" -- I don't think anyone ever argues that Riker became captain in "Darmok" or "Final Mission.")
Was someone other than Picard officially logged as the Enterprise's CO on any occasions other than "Best of Both Worlds" (Riker) and "Chain of Command" (Jellico)?
"I don't mind the fact that race, creed, sex, ethnicity, and the disabled are protected classes, but I draw the line at stupidity." -- Jethro Elvis
: Attack otters of the ass. In submarines.