Previously, the user_gesture bit was set at different places and could be
updated during the lifetime of a navigation, such as in WillStartNavigation
and at commit time. In practice, whether a navigation was initiated by
user gesture is known at the time a NavigationHandle is created.
clamy suggested that we could set the user gesture bit at NavHandle
construction time in the following places:
- PlzNavigate: we have it when we create the handle.
- Regular navs: we add the parameter to DidStartProvisionalLoad.
- same-page navs: we create the NavigationHandle in DidCommitProvisionalLoad,
where we have the information.
Comment 1 by bugdroid1@chromium.org
, Nov 30 2016