|
|
Created:
4 years, 2 months ago by djacobo_ Modified:
4 years, 2 months ago Reviewers:
Yusuke Sato CC:
chromium-reviews, elijahtaylor+arcwatch_chromium.org, yusukes+watch_chromium.org, hidehiko+watch_chromium.org, lhchavez+watch_chromium.org, oshima+watch_chromium.org, davemoore+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionCapture http to https navigations w/ intent picker
For navigations from http to https we cannot rely on the Referrer's url
since it is cleaned due to the sanitization proccess. For this case we
will make use of GetLastCommittedURL(), the main purpose of this
information is to decide whether or not to register
ArcNavigationThrottle as a candidate to handle a given navigation.
BUG=654941
TEST=look at the bug description for repro.
Committed: https://crrev.com/21236422b54f032ac6a7dcd42d4c8768129f82ae
Cr-Commit-Position: refs/heads/master@{#426610}
Patch Set 1 #
Total comments: 6
Patch Set 2 : Typo fix #Patch Set 3 : Adding up to the code comments. #Messages
Total messages: 26 (17 generated)
The CQ bit was checked by djacobo@google.com 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...
Description was changed from ========== Capture http to https navigations w/ intent picker For navigations from http to https we cannot rely on the Referrer's url since it is cleaned due to the sanitization proccess. For this case we will make use of GetLastCommittedURL(), the main purpose of this information is to decide whether or not to register ArcNavigationThrottle as a candidate to handle a given navigation. BUG=654941 TEST=look at the bug description for repro. ========== to ========== Capture http to https navigations w/ intent picker For navigations from http to https we cannot rely on the Referrer's url since it is cleaned due to the sanitization proccess. For this case we will make use of GetLastCommittedURL(), the main purpose of this information is to decide whether or not to register ArcNavigationThrottle as a candidate to handle a given navigation. BUG=654941 TEST=look at the bug description for repro. ==========
djacobo@google.com changed reviewers: + yusukes@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
PTAL
https://codereview.chromium.org/2436923002/diff/1/chrome/browser/chromeos/arc... File chrome/browser/chromeos/arc/arc_navigation_throttle.cc (right): https://codereview.chromium.org/2436923002/diff/1/chrome/browser/chromeos/arc... chrome/browser/chromeos/arc/arc_navigation_throttle.cc:129: // committed URL. We don't use GetVisibleURL() since it may contains a still nit: contain? https://codereview.chromium.org/2436923002/diff/1/chrome/browser/chromeos/arc... chrome/browser/chromeos/arc/arc_navigation_throttle.cc:132: referrer_url.is_empty() ? last_committed_url : referrer_url; qq: We still need the is_empty() check because there are cases where referrer_url is not empty but last_committed_url is empty, correct? When does that happen? Probably a new tab or window is created for the navigation (e.g. with <a href=... target="_blank">)?
The CQ bit was checked by djacobo@google.com 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...
https://codereview.chromium.org/2436923002/diff/1/chrome/browser/chromeos/arc... File chrome/browser/chromeos/arc/arc_navigation_throttle.cc (right): https://codereview.chromium.org/2436923002/diff/1/chrome/browser/chromeos/arc... chrome/browser/chromeos/arc/arc_navigation_throttle.cc:129: // committed URL. We don't use GetVisibleURL() since it may contains a still On 2016/10/20 15:20:53, Yusuke Sato wrote: > nit: contain? Done. https://codereview.chromium.org/2436923002/diff/1/chrome/browser/chromeos/arc... chrome/browser/chromeos/arc/arc_navigation_throttle.cc:132: referrer_url.is_empty() ? last_committed_url : referrer_url; On 2016/10/20 15:20:52, Yusuke Sato wrote: > qq: We still need the is_empty() check because there are cases where > referrer_url is not empty but last_committed_url is empty, correct? When does > that happen? Probably a new tab or window is created for the navigation (e.g. > with <a href=... target="_blank">)? Correct, the navigation started with target="_blank" will have no past entries for a new tab, so last_committed_url can be empty whereas referrer preserves a value.
lgtm with a small request. https://codereview.chromium.org/2436923002/diff/1/chrome/browser/chromeos/arc... File chrome/browser/chromeos/arc/arc_navigation_throttle.cc (right): https://codereview.chromium.org/2436923002/diff/1/chrome/browser/chromeos/arc... chrome/browser/chromeos/arc/arc_navigation_throttle.cc:132: referrer_url.is_empty() ? last_committed_url : referrer_url; On 2016/10/20 18:38:14, djacobo wrote: > On 2016/10/20 15:20:52, Yusuke Sato wrote: > > qq: We still need the is_empty() check because there are cases where > > referrer_url is not empty but last_committed_url is empty, correct? When does > > that happen? Probably a new tab or window is created for the navigation (e.g. > > with <a href=... target="_blank">)? > > Correct, the navigation started with target="_blank" will have no past entries > for a new tab, so last_committed_url can be empty whereas referrer preserves a > value. Can you mention this in the code comment?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by djacobo@google.com 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...
https://codereview.chromium.org/2436923002/diff/1/chrome/browser/chromeos/arc... File chrome/browser/chromeos/arc/arc_navigation_throttle.cc (right): https://codereview.chromium.org/2436923002/diff/1/chrome/browser/chromeos/arc... chrome/browser/chromeos/arc/arc_navigation_throttle.cc:132: referrer_url.is_empty() ? last_committed_url : referrer_url; On 2016/10/20 19:32:05, Yusuke Sato wrote: > On 2016/10/20 18:38:14, djacobo wrote: > > On 2016/10/20 15:20:52, Yusuke Sato wrote: > > > qq: We still need the is_empty() check because there are cases where > > > referrer_url is not empty but last_committed_url is empty, correct? When > does > > > that happen? Probably a new tab or window is created for the navigation > (e.g. > > > with <a href=... target="_blank">)? > > > > Correct, the navigation started with target="_blank" will have no past entries > > for a new tab, so last_committed_url can be empty whereas referrer preserves a > > value. > > Can you mention this in the code comment? Done.
lgtm, thanks!
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by djacobo@google.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Capture http to https navigations w/ intent picker For navigations from http to https we cannot rely on the Referrer's url since it is cleaned due to the sanitization proccess. For this case we will make use of GetLastCommittedURL(), the main purpose of this information is to decide whether or not to register ArcNavigationThrottle as a candidate to handle a given navigation. BUG=654941 TEST=look at the bug description for repro. ========== to ========== Capture http to https navigations w/ intent picker For navigations from http to https we cannot rely on the Referrer's url since it is cleaned due to the sanitization proccess. For this case we will make use of GetLastCommittedURL(), the main purpose of this information is to decide whether or not to register ArcNavigationThrottle as a candidate to handle a given navigation. BUG=654941 TEST=look at the bug description for repro. ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== Capture http to https navigations w/ intent picker For navigations from http to https we cannot rely on the Referrer's url since it is cleaned due to the sanitization proccess. For this case we will make use of GetLastCommittedURL(), the main purpose of this information is to decide whether or not to register ArcNavigationThrottle as a candidate to handle a given navigation. BUG=654941 TEST=look at the bug description for repro. ========== to ========== Capture http to https navigations w/ intent picker For navigations from http to https we cannot rely on the Referrer's url since it is cleaned due to the sanitization proccess. For this case we will make use of GetLastCommittedURL(), the main purpose of this information is to decide whether or not to register ArcNavigationThrottle as a candidate to handle a given navigation. BUG=654941 TEST=look at the bug description for repro. Committed: https://crrev.com/21236422b54f032ac6a7dcd42d4c8768129f82ae Cr-Commit-Position: refs/heads/master@{#426610} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/21236422b54f032ac6a7dcd42d4c8768129f82ae Cr-Commit-Position: refs/heads/master@{#426610} |