|
|
Chromium Code Reviews
DescriptionChange navigation initiation type default value to RENDERER_INITIATED
This CL changes the default value of navigation initiation type to
RENDERER_INITIATED because USER_INITIATED has higher permissions than
RENDERER_INITIATED.
BUG=693789
Review-Url: https://codereview.chromium.org/2706173003
Cr-Commit-Position: refs/heads/master@{#452140}
Committed: https://chromium.googlesource.com/chromium/src/+/01ce4225edd03c523175bb2c6b6cf0af8d5e9c86
Patch Set 1 #
Total comments: 5
Patch Set 2 : Add NONE to NavigationInitiationType #
Total comments: 4
Patch Set 3 : Update comments #Patch Set 4 : Update comments again #Patch Set 5 : vv #
Messages
Total messages: 33 (16 generated)
Description was changed from ========== change navigation initiation type default value to RENDERER_INITIATED This CL changes the default value of navigation initiation type to RENDERER_INITIATED because USER_INITIATED has higher permissions than RENDERER_INITIATED. BUG=693789 ========== to ========== change navigation initiation type default value to RENDERER_INITIATED This CL changes the default value of navigation initiation type to RENDERER_INITIATED because USER_INITIATED has higher permissions than RENDERER_INITIATED. BUG=693789 ==========
liaoyuke@chromium.org changed reviewers: + eugenebut@chromium.org, kkhorimoto@chromium.org
The CQ bit was checked by liaoyuke@chromium.org to run a CQ dry run
Hi Eugene, Kurt, PTAL. Thank you very much!
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm
not lgtm https://codereview.chromium.org/2706173003/diff/1/ios/web/navigation/navigati... File ios/web/navigation/navigation_item_impl.mm (right): https://codereview.chromium.org/2706173003/diff/1/ios/web/navigation/navigati... ios/web/navigation/navigation_item_impl.mm:312: web::NavigationInitiationType::RENDERER_INITIATED); This should remain as USER_INITIATED. Once a RENDERER_INITIATED navigation is committed, we show its URL in the omnibox. Any back/forward navigations to that NavigationItem should treat it as USER_INITIATED because the user has already seen the URL and is (presumably) consciously navigating back to it, so it should be used as the visible item.
https://codereview.chromium.org/2706173003/diff/1/ios/web/navigation/navigati... File ios/web/navigation/navigation_item_impl.mm (right): https://codereview.chromium.org/2706173003/diff/1/ios/web/navigation/navigati... ios/web/navigation/navigation_item_impl.mm:312: web::NavigationInitiationType::RENDERER_INITIATED); On 2017/02/21 18:53:19, kkhorimoto_ wrote: > Any back/forward navigations to that NavigationItem should treat it as USER_INITIATED because the user has already > seen the URL and is (presumably) consciously navigating back to it, so it should > be used as the visible item. Is this actually true? During back forward navigation chrome should not show pending URL in the omnibox: https://docs.google.com/a/google.com/document/d/1GvsaoNtMO7d87FzoysOW5GqH6XEr...
https://codereview.chromium.org/2706173003/diff/1/ios/web/navigation/navigati... File ios/web/navigation/navigation_item_impl.mm (right): https://codereview.chromium.org/2706173003/diff/1/ios/web/navigation/navigati... ios/web/navigation/navigation_item_impl.mm:312: web::NavigationInitiationType::RENDERER_INITIATED); On 2017/02/21 19:03:40, Eugene But wrote: > On 2017/02/21 18:53:19, kkhorimoto_ wrote: > > Any back/forward navigations to that NavigationItem should treat it as > USER_INITIATED because the user has already > > seen the URL and is (presumably) consciously navigating back to it, so it > should > > be used as the visible item. > Is this actually true? During back forward navigation chrome should not show > pending URL in the omnibox: > https://docs.google.com/a/google.com/document/d/1GvsaoNtMO7d87FzoysOW5GqH6XEr... That was at least the intention of this function when it was created. Maybe after your refactor this function isn't required anymore? It definitely seems wrong to set every NavigationItem to RENDERER_INITIATED upon committing.
https://codereview.chromium.org/2706173003/diff/1/ios/web/navigation/navigati... File ios/web/navigation/navigation_item_impl.mm (right): https://codereview.chromium.org/2706173003/diff/1/ios/web/navigation/navigati... ios/web/navigation/navigation_item_impl.mm:312: web::NavigationInitiationType::RENDERER_INITIATED); On 2017/02/21 19:28:11, kkhorimoto_ wrote: > On 2017/02/21 19:03:40, Eugene But wrote: > > On 2017/02/21 18:53:19, kkhorimoto_ wrote: > > > Any back/forward navigations to that NavigationItem should treat it as > > USER_INITIATED because the user has already > > > seen the URL and is (presumably) consciously navigating back to it, so it > > should > > > be used as the visible item. > > Is this actually true? During back forward navigation chrome should not show > > pending URL in the omnibox: > > > https://docs.google.com/a/google.com/document/d/1GvsaoNtMO7d87FzoysOW5GqH6XEr... > > That was at least the intention of this function when it was created. Maybe > after your refactor this function isn't required anymore? It definitely seems > wrong to set every NavigationItem to RENDERER_INITIATED upon committing. NavigationEntry also marks the entry as user-initiated: void NavigationEntryImpl::ResetForCommit(FrameNavigationEntry* frame_entry) { So seems like we want to keep current behavior (though I still not sure why :)). Yuke, I think creis@ would be a good person to ask why ResetForCommit behaves this way.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2017/02/21 19:33:29, Eugene But wrote: > https://codereview.chromium.org/2706173003/diff/1/ios/web/navigation/navigati... > File ios/web/navigation/navigation_item_impl.mm (right): > > https://codereview.chromium.org/2706173003/diff/1/ios/web/navigation/navigati... > ios/web/navigation/navigation_item_impl.mm:312: > web::NavigationInitiationType::RENDERER_INITIATED); > On 2017/02/21 19:28:11, kkhorimoto_ wrote: > > On 2017/02/21 19:03:40, Eugene But wrote: > > > On 2017/02/21 18:53:19, kkhorimoto_ wrote: > > > > Any back/forward navigations to that NavigationItem should treat it as > > > USER_INITIATED because the user has already > > > > seen the URL and is (presumably) consciously navigating back to it, so it > > > should > > > > be used as the visible item. > > > Is this actually true? During back forward navigation chrome should not show > > > pending URL in the omnibox: > > > > > > https://docs.google.com/a/google.com/document/d/1GvsaoNtMO7d87FzoysOW5GqH6XEr... > > > > That was at least the intention of this function when it was created. Maybe > > after your refactor this function isn't required anymore? It definitely seems > > wrong to set every NavigationItem to RENDERER_INITIATED upon committing. > NavigationEntry also marks the entry as user-initiated: > void NavigationEntryImpl::ResetForCommit(FrameNavigationEntry* frame_entry) { > So seems like we want to keep current behavior (though I still not sure why :)). > > Yuke, I think creis@ would be a good person to ask why ResetForCommit behaves > this way. hmm, this is tricky. I just talked to creis@, and he says when "is_renderer_initiated" is set to false, it means that "is_renderer_initiated" is cleared, and does not support querying anymore. Personally, I think this is super confusing as it is more intuitive to understand the negate of "is renderer initiated" as "is user initiated" instead of "cleared". Should we add a NONE to NavigationInitiationType to avoid confusion?
On 2017/02/21 22:21:16, liaoyuke wrote: > On 2017/02/21 19:33:29, Eugene But wrote: > > > https://codereview.chromium.org/2706173003/diff/1/ios/web/navigation/navigati... > > File ios/web/navigation/navigation_item_impl.mm (right): > > > > > https://codereview.chromium.org/2706173003/diff/1/ios/web/navigation/navigati... > > ios/web/navigation/navigation_item_impl.mm:312: > > web::NavigationInitiationType::RENDERER_INITIATED); > > On 2017/02/21 19:28:11, kkhorimoto_ wrote: > > > On 2017/02/21 19:03:40, Eugene But wrote: > > > > On 2017/02/21 18:53:19, kkhorimoto_ wrote: > > > > > Any back/forward navigations to that NavigationItem should treat it as > > > > USER_INITIATED because the user has already > > > > > seen the URL and is (presumably) consciously navigating back to it, so > it > > > > should > > > > > be used as the visible item. > > > > Is this actually true? During back forward navigation chrome should not > show > > > > pending URL in the omnibox: > > > > > > > > > > https://docs.google.com/a/google.com/document/d/1GvsaoNtMO7d87FzoysOW5GqH6XEr... > > > > > > That was at least the intention of this function when it was created. Maybe > > > after your refactor this function isn't required anymore? It definitely > seems > > > wrong to set every NavigationItem to RENDERER_INITIATED upon committing. > > NavigationEntry also marks the entry as user-initiated: > > void NavigationEntryImpl::ResetForCommit(FrameNavigationEntry* frame_entry) { > > So seems like we want to keep current behavior (though I still not sure why > :)). > > > > Yuke, I think creis@ would be a good person to ask why ResetForCommit behaves > > this way. > > hmm, this is tricky. I just talked to creis@, and he says when > "is_renderer_initiated" is set to false, it means that "is_renderer_initiated" > is cleared, and does not support querying anymore. > > Personally, I think this is super confusing as it is more intuitive to > understand the negate of "is renderer initiated" as "is user initiated" instead > of "cleared". > > Should we add a NONE to NavigationInitiationType to avoid confusion? Adding NONE and updating navigation_item_impl comments sounds like the right direction to me.
Patchset #2 (id:20001) has been deleted
PTAL. Thank you very much! https://codereview.chromium.org/2706173003/diff/1/ios/web/navigation/navigati... File ios/web/navigation/navigation_item_impl.mm (right): https://codereview.chromium.org/2706173003/diff/1/ios/web/navigation/navigati... ios/web/navigation/navigation_item_impl.mm:312: web::NavigationInitiationType::RENDERER_INITIATED); On 2017/02/21 18:53:19, kkhorimoto_ wrote: > This should remain as USER_INITIATED. Once a RENDERER_INITIATED navigation is > committed, we show its URL in the omnibox. Any back/forward navigations to that > NavigationItem should treat it as USER_INITIATED because the user has already > seen the URL and is (presumably) consciously navigating back to it, so it should > be used as the visible item. Got it! Thank you for explaining!
Please update SetNavigationInitiationType/NavigationInitiationType comments https://codereview.chromium.org/2706173003/diff/40001/ios/web/navigation/navi... File ios/web/navigation/navigation_manager_impl.h (right): https://codereview.chromium.org/2706173003/diff/40001/ios/web/navigation/navi... ios/web/navigation/navigation_manager_impl.h:31: NONE = 1, This can be 0, because it's a good default value. https://codereview.chromium.org/2706173003/diff/40001/ios/web/navigation/navi... ios/web/navigation/navigation_manager_impl.h:31: NONE = 1, Needs comments
PTAL. Thanks! https://codereview.chromium.org/2706173003/diff/40001/ios/web/navigation/navi... File ios/web/navigation/navigation_manager_impl.h (right): https://codereview.chromium.org/2706173003/diff/40001/ios/web/navigation/navi... ios/web/navigation/navigation_manager_impl.h:31: NONE = 1, On 2017/02/21 23:00:40, Eugene But wrote: > This can be 0, because it's a good default value. Done. https://codereview.chromium.org/2706173003/diff/40001/ios/web/navigation/navi... ios/web/navigation/navigation_manager_impl.h:31: NONE = 1, On 2017/02/21 23:00:40, Eugene But wrote: > Needs comments Done.
lgtm, but please capitalize "Change" in your CL description :)
Description was changed from ========== change navigation initiation type default value to RENDERER_INITIATED This CL changes the default value of navigation initiation type to RENDERER_INITIATED because USER_INITIATED has higher permissions than RENDERER_INITIATED. BUG=693789 ========== to ========== Change navigation initiation type default value to RENDERER_INITIATED This CL changes the default value of navigation initiation type to RENDERER_INITIATED because USER_INITIATED has higher permissions than RENDERER_INITIATED. BUG=693789 ==========
On 2017/02/21 23:07:47, liaoyuke wrote: > PTAL. > > Thanks! > > https://codereview.chromium.org/2706173003/diff/40001/ios/web/navigation/navi... > File ios/web/navigation/navigation_manager_impl.h (right): > > https://codereview.chromium.org/2706173003/diff/40001/ios/web/navigation/navi... > ios/web/navigation/navigation_manager_impl.h:31: NONE = 1, > On 2017/02/21 23:00:40, Eugene But wrote: > > This can be 0, because it's a good default value. > > Done. > > https://codereview.chromium.org/2706173003/diff/40001/ios/web/navigation/navi... > ios/web/navigation/navigation_manager_impl.h:31: NONE = 1, > On 2017/02/21 23:00:40, Eugene But wrote: > > Needs comments > > Done. Please address my previous comment which was: "Please update SetNavigationInitiationType/NavigationInitiationType comments"
On 2017/02/21 23:09:54, Eugene But wrote: > On 2017/02/21 23:07:47, liaoyuke wrote: > > PTAL. > > > > Thanks! > > > > > https://codereview.chromium.org/2706173003/diff/40001/ios/web/navigation/navi... > > File ios/web/navigation/navigation_manager_impl.h (right): > > > > > https://codereview.chromium.org/2706173003/diff/40001/ios/web/navigation/navi... > > ios/web/navigation/navigation_manager_impl.h:31: NONE = 1, > > On 2017/02/21 23:00:40, Eugene But wrote: > > > This can be 0, because it's a good default value. > > > > Done. > > > > > https://codereview.chromium.org/2706173003/diff/40001/ios/web/navigation/navi... > > ios/web/navigation/navigation_manager_impl.h:31: NONE = 1, > > On 2017/02/21 23:00:40, Eugene But wrote: > > > Needs comments > > > > Done. > Please address my previous comment which was: > "Please update SetNavigationInitiationType/NavigationInitiationType comments" Done. Thank you for catching it! PTAL.
lgtm
The CQ bit was checked by liaoyuke@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
The CQ bit was checked by liaoyuke@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from kkhorimoto@chromium.org Link to the patchset: https://codereview.chromium.org/2706173003/#ps80001 (title: "Update comments again")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 80001, "attempt_start_ts": 1487786499908800,
"parent_rev": "a4571ccd2f0151685e7653c2ae5fda4b859f00c3", "commit_rev":
"01ce4225edd03c523175bb2c6b6cf0af8d5e9c86"}
Message was sent while issue was closed.
Description was changed from ========== Change navigation initiation type default value to RENDERER_INITIATED This CL changes the default value of navigation initiation type to RENDERER_INITIATED because USER_INITIATED has higher permissions than RENDERER_INITIATED. BUG=693789 ========== to ========== Change navigation initiation type default value to RENDERER_INITIATED This CL changes the default value of navigation initiation type to RENDERER_INITIATED because USER_INITIATED has higher permissions than RENDERER_INITIATED. BUG=693789 Review-Url: https://codereview.chromium.org/2706173003 Cr-Commit-Position: refs/heads/master@{#452140} Committed: https://chromium.googlesource.com/chromium/src/+/01ce4225edd03c523175bb2c6b6c... ==========
Message was sent while issue was closed.
Committed patchset #4 (id:80001) as https://chromium.googlesource.com/chromium/src/+/01ce4225edd03c523175bb2c6b6c... |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
