|
|
Chromium Code Reviews|
Created:
4 years, 4 months ago by Yusuke Sato Modified:
4 years, 3 months ago 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 Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionOpen |current_url| in Chrome when |previous_url| is empty
to prevent the disambig window from being shown when it shouldn't be.
BUG=640393
TEST=see repro steps in b/31043273
TEST=try
Committed: https://crrev.com/772b47ff82c6450985f727a6fa13d3366143a745
Cr-Commit-Position: refs/heads/master@{#419900}
Patch Set 1 #Patch Set 2 : add unittest #
Total comments: 6
Patch Set 3 : Address Ben's comments #
Total comments: 3
Patch Set 4 : Address Xiyuan's comment #
Messages
Total messages: 30 (15 generated)
The CQ bit was checked by yusukes@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...
yusukes@chromium.org changed reviewers: + djacobo@google.com, kenobi@chromium.org
ptal
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm
Do we understand all the scenarios under which the referrer may not be set, and are we okay with all those scenarios never popping up a disambig? For example, would installing a referrer blocker cause this code to always block the disambig?
On 2016/08/24 14:24:48, Ben Kwa wrote: > Do we understand all the scenarios under which the referrer may not be set, and > are we okay with all those scenarios never popping up a disambig? For example, > would installing a referrer blocker cause this code to always block the > disambig? I am not sure of all the scenarios, but I found one pretty common that would break the intent picker flow, so please let's re-think our solution for this bug :)
On 2016/09/02 02:23:11, djacobo wrote: > On 2016/08/24 14:24:48, Ben Kwa wrote: > > Do we understand all the scenarios under which the referrer may not be set, > and > > are we okay with all those scenarios never popping up a disambig? For > example, > > would installing a referrer blocker cause this code to always block the > > disambig? > > I am not sure of all the scenarios, but I found one pretty common that would > break the intent picker flow, so please let's re-think our solution for this bug > :) As per our discussion offline, I am OK with this solution :)
Description was changed from ========== Open |current_url| in Chrome when |previous_url| is empty BUG=640393 TEST=see repro steps in b/31043273 ========== to ========== Open |current_url| in Chrome when |previous_url| is empty to prevent the disambig window from being shown when it shouldn't be. BUG=640393 TEST=see repro steps in b/31043273 TEST=try ==========
Sorry for the delay - I was too busy with other P1s. Replies inlined: > I found one pretty common that would break the intent picker flow David and I confirmed this was not true. > Do we understand all the scenarios under which the referrer may not be set, and are we okay with all those scenarios never popping up a disambig? Yes and yes. The referrer becomes empty if 1) the navigation is from https to http (to avoid leaking the secure URL), or 2) the navigation is from a site where sending a referrer is explicitly disabled, or 3) a Chrome extension for removing referrers is installed. 1) is done in Referrer::SanitizeForRequest() in content/public/common/referrer.cc (see |is_downgrade| variable.) 2) is typically done via the site's <meta> element, the link's (<a> element's) attribute, etc. b/31043273 is caused by 2). > For example, would installing a referrer blocker cause this code to always block the disambig? This is an example of 3). In all cases, I think not showing the picker is acceptable because false positives (showing the picker when we shouldn't) are much more harmful for the user than false negatives (not showing the picker when we should). The user can usually work around false negatives by right-clicking the link or launching the app manually, but the user doesn't always have a way to work around false positives. False positives sometimes completely break users' work flow and b/31043273 is a good example. I prefer to be on the safer side.
The CQ bit was checked by yusukes@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...
Added unit tests for ShouldOverrideUrlLoading() as the function is getting more complicated. Please take another look.
LGTM with a couple of nits. https://codereview.chromium.org/2277533002/diff/20001/chrome/browser/chromeos... File chrome/browser/chromeos/arc/arc_navigation_throttle_unittest.cc (right): https://codereview.chromium.org/2277533002/diff/20001/chrome/browser/chromeos... chrome/browser/chromeos/arc/arc_navigation_throttle_unittest.cc:12: // A navigation within the same domain shouldn't be overwridden. nit: "overridden" https://codereview.chromium.org/2277533002/diff/20001/chrome/browser/chromeos... chrome/browser/chromeos/arc/arc_navigation_throttle_unittest.cc:26: // If either of two paramters is empty, the fucntion should return false. nit: "function" https://codereview.chromium.org/2277533002/diff/20001/chrome/browser/chromeos... chrome/browser/chromeos/arc/arc_navigation_throttle_unittest.cc:34: // A navigation not within the same domain can be. suggest: "can be overridden"
The CQ bit was checked by yusukes@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...
yusukes@chromium.org changed reviewers: + xiyuan@chromium.org
Thanks Ben. +xiyuan, chromeos/ OWNER. https://codereview.chromium.org/2277533002/diff/20001/chrome/browser/chromeos... File chrome/browser/chromeos/arc/arc_navigation_throttle_unittest.cc (right): https://codereview.chromium.org/2277533002/diff/20001/chrome/browser/chromeos... chrome/browser/chromeos/arc/arc_navigation_throttle_unittest.cc:12: // A navigation within the same domain shouldn't be overwridden. On 2016/09/20 21:28:30, Ben Kwa wrote: > nit: "overridden" Done. https://codereview.chromium.org/2277533002/diff/20001/chrome/browser/chromeos... chrome/browser/chromeos/arc/arc_navigation_throttle_unittest.cc:26: // If either of two paramters is empty, the fucntion should return false. On 2016/09/20 21:28:30, Ben Kwa wrote: > nit: "function" Done. https://codereview.chromium.org/2277533002/diff/20001/chrome/browser/chromeos... chrome/browser/chromeos/arc/arc_navigation_throttle_unittest.cc:34: // A navigation not within the same domain can be. On 2016/09/20 21:28:30, Ben Kwa wrote: > suggest: "can be overridden" Done.
lgtm https://codereview.chromium.org/2277533002/diff/40001/chrome/browser/chromeos... File chrome/browser/chromeos/arc/arc_navigation_throttle.h (right): https://codereview.chromium.org/2277533002/diff/40001/chrome/browser/chromeos... chrome/browser/chromeos/arc/arc_navigation_throttle.h:77: static bool ShouldOverrideUrlLoading(const GURL& previous_url, nit: Move this to cc in an anonymous namespace ?
https://codereview.chromium.org/2277533002/diff/40001/chrome/browser/chromeos... File chrome/browser/chromeos/arc/arc_navigation_throttle.cc (right): https://codereview.chromium.org/2277533002/diff/40001/chrome/browser/chromeos... chrome/browser/chromeos/arc/arc_navigation_throttle.cc:265: // When the navigation is initiated via e.g. JavaScript code, the referrer Slightly modified the comment too. https://codereview.chromium.org/2277533002/diff/40001/chrome/browser/chromeos... File chrome/browser/chromeos/arc/arc_navigation_throttle.h (right): https://codereview.chromium.org/2277533002/diff/40001/chrome/browser/chromeos... chrome/browser/chromeos/arc/arc_navigation_throttle.h:77: static bool ShouldOverrideUrlLoading(const GURL& previous_url, On 2016/09/20 22:27:58, xiyuan wrote: > nit: Move this to cc in an anonymous namespace ? That's better, thanks. Done.
The CQ bit was checked by yusukes@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from djacobo@google.com, kenobi@chromium.org, xiyuan@chromium.org Link to the patchset: https://codereview.chromium.org/2277533002/#ps60001 (title: "Address Xiyuan's comment")
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 ========== Open |current_url| in Chrome when |previous_url| is empty to prevent the disambig window from being shown when it shouldn't be. BUG=640393 TEST=see repro steps in b/31043273 TEST=try ========== to ========== Open |current_url| in Chrome when |previous_url| is empty to prevent the disambig window from being shown when it shouldn't be. BUG=640393 TEST=see repro steps in b/31043273 TEST=try ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== Open |current_url| in Chrome when |previous_url| is empty to prevent the disambig window from being shown when it shouldn't be. BUG=640393 TEST=see repro steps in b/31043273 TEST=try ========== to ========== Open |current_url| in Chrome when |previous_url| is empty to prevent the disambig window from being shown when it shouldn't be. BUG=640393 TEST=see repro steps in b/31043273 TEST=try Committed: https://crrev.com/772b47ff82c6450985f727a6fa13d3366143a745 Cr-Commit-Position: refs/heads/master@{#419900} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/772b47ff82c6450985f727a6fa13d3366143a745 Cr-Commit-Position: refs/heads/master@{#419900} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
