Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Issue 914223002: PlzNavigate: Updated navigation cancel policy for renderer-initiated requests. (Closed)

Created:
5 years, 10 months ago by carlosk
Modified:
5 years, 10 months ago
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

PlzNavigate: Updated navigation cancel policy for renderer-initiated requests. Now the navigation cancellation logic should conform to what has been described in the "PlzNavigate: Navigation cancellation" design document [1]. Added some new tests to exercise the cancellation cases described in the document. Note: This is being developed on top of http://crrev.com/912833002. [1] https://docs.google.com/a/chromium.org/document/d/1lO7_fgppFTDd8PSQfIb888z7vODcw2Sc8r7h5Rbiwcg/edit# BUG=376014 Committed: https://crrev.com/f470789ee8bfc010c29df458601ca0a33efbb2ca Cr-Commit-Position: refs/heads/master@{#317083}

Patch Set 1 : #

Patch Set 2 : Two comment changes #

Total comments: 16

Patch Set 3 : Some fixes and a new test added. #

Total comments: 4

Patch Set 4 : Uploaded again, now properly based off of crrev.com/912833002 . #

Patch Set 5 : More testing. #

Total comments: 6

Patch Set 6 : Comment changes. #

Total comments: 20

Patch Set 7 : Changes from CR comments. #

Total comments: 2

Patch Set 8 : Reverted method name; comment updates. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+261 lines, -22 lines) Patch
M content/browser/frame_host/navigation_request.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigator_impl.cc View 1 2 3 4 5 6 7 1 chunk +17 lines, -4 lines 0 comments Download
M content/browser/frame_host/navigator_impl_unittest.cc View 1 2 3 4 5 6 7 12 chunks +235 lines, -12 lines 0 comments Download
M content/test/test_render_frame_host.h View 1 chunk +1 line, -1 line 0 comments Download
M content/test/test_render_frame_host.cc View 1 2 chunks +6 lines, -5 lines 0 comments Download

Messages

Total messages: 34 (14 generated)
carlosk
clamy@: PTAL. fdegans@: FYI.
5 years, 10 months ago (2015-02-11 16:44:13 UTC) #5
clamy
Thanks! It should be quite good once the issue with browser-initiated navigations is fixed. https://codereview.chromium.org/914223002/diff/60001/content/browser/frame_host/navigator_impl.cc ...
5 years, 10 months ago (2015-02-11 17:22:30 UTC) #6
carlosk
Thanks! Good catch on the request-ignoring logic clamy@! https://codereview.chromium.org/914223002/diff/60001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc (right): https://codereview.chromium.org/914223002/diff/60001/content/browser/frame_host/navigator_impl.cc#newcode713 content/browser/frame_host/navigator_impl.cc:713: ongoing_navigation_request->begin_params().has_user_gesture ...
5 years, 10 months ago (2015-02-12 12:21:06 UTC) #7
clamy
Thanks! A few more nits and it should be good to go. https://codereview.chromium.org/914223002/diff/60001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc ...
5 years, 10 months ago (2015-02-12 18:08:07 UTC) #8
carlosk
Thanks for another round or reviews. https://codereview.chromium.org/914223002/diff/60001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc (right): https://codereview.chromium.org/914223002/diff/60001/content/browser/frame_host/navigator_impl.cc#newcode715 content/browser/frame_host/navigator_impl.cc:715: // The renderer ...
5 years, 10 months ago (2015-02-13 13:44:29 UTC) #9
clamy
Thnaks! Lgtm with a few nits. https://codereview.chromium.org/914223002/diff/120001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc (right): https://codereview.chromium.org/914223002/diff/120001/content/browser/frame_host/navigator_impl.cc#newcode718 content/browser/frame_host/navigator_impl.cc:718: // is not ...
5 years, 10 months ago (2015-02-13 14:56:35 UTC) #10
carlosk
Thanks. nasko@: PTAL. https://codereview.chromium.org/914223002/diff/120001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc (right): https://codereview.chromium.org/914223002/diff/120001/content/browser/frame_host/navigator_impl.cc#newcode718 content/browser/frame_host/navigator_impl.cc:718: // is not user-initiated. On 2015/02/13 ...
5 years, 10 months ago (2015-02-13 15:57:13 UTC) #14
carlosk
creis@: PTAL (adding you as it seems nasko@ will be OoO for a while).
5 years, 10 months ago (2015-02-16 14:10:02 UTC) #17
Charlie Reis
Thanks-- this should bring some sanity to the navigation canceling logic. A few comments below. ...
5 years, 10 months ago (2015-02-17 23:48:30 UTC) #18
clamy
https://codereview.chromium.org/914223002/diff/140001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc (right): https://codereview.chromium.org/914223002/diff/140001/content/browser/frame_host/navigator_impl.cc#newcode724 content/browser/frame_host/navigator_impl.cc:724: // NavigationRequest is created and stored in the map. ...
5 years, 10 months ago (2015-02-18 12:45:33 UTC) #19
carlosk
Thanks. https://codereview.chromium.org/914223002/diff/140001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc (right): https://codereview.chromium.org/914223002/diff/140001/content/browser/frame_host/navigator_impl.cc#newcode706 content/browser/frame_host/navigator_impl.cc:706: CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( On 2015/02/17 23:48:29, Charlie Reis wrote: > ...
5 years, 10 months ago (2015-02-18 15:28:26 UTC) #20
Charlie Reis
Thanks. LGTM if you change RendererInitiatedNavigationRequest back to OnBeginNavigation. https://codereview.chromium.org/914223002/diff/140001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc (right): https://codereview.chromium.org/914223002/diff/140001/content/browser/frame_host/navigator_impl.cc#newcode706 content/browser/frame_host/navigator_impl.cc:706: ...
5 years, 10 months ago (2015-02-19 00:58:00 UTC) #21
carlosk
Thanks again. Just want to better understand the naming thing. https://codereview.chromium.org/914223002/diff/140001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc (right): https://codereview.chromium.org/914223002/diff/140001/content/browser/frame_host/navigator_impl.cc#newcode706 ...
5 years, 10 months ago (2015-02-19 10:45:18 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/914223002/180001
5 years, 10 months ago (2015-02-19 10:46:26 UTC) #25
commit-bot: I haz the power
All required reviewers (with asterisk prefixes) have not yet approved this CL. No LGTM from ...
5 years, 10 months ago (2015-02-19 10:46:30 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/914223002/180001
5 years, 10 months ago (2015-02-19 17:08:04 UTC) #30
Charlie Reis
https://codereview.chromium.org/914223002/diff/140001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc (right): https://codereview.chromium.org/914223002/diff/140001/content/browser/frame_host/navigator_impl.cc#newcode706 content/browser/frame_host/navigator_impl.cc:706: CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( On 2015/02/19 10:45:18, carlosk wrote: > On 2015/02/19 ...
5 years, 10 months ago (2015-02-19 18:42:12 UTC) #31
commit-bot: I haz the power
Committed patchset #8 (id:180001)
5 years, 10 months ago (2015-02-19 18:47:51 UTC) #32
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/f470789ee8bfc010c29df458601ca0a33efbb2ca Cr-Commit-Position: refs/heads/master@{#317083}
5 years, 10 months ago (2015-02-19 18:48:22 UTC) #33
carlosk
5 years, 10 months ago (2015-02-20 09:57:11 UTC) #34
Message was sent while issue was closed.
Thanks!

https://codereview.chromium.org/914223002/diff/140001/content/browser/frame_h...
File content/browser/frame_host/navigator_impl.cc (right):

https://codereview.chromium.org/914223002/diff/140001/content/browser/frame_h...
content/browser/frame_host/navigator_impl.cc:706:
CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
On 2015/02/19 18:42:12, Charlie Reis wrote:
> On 2015/02/19 10:45:18, carlosk wrote:
> > On 2015/02/19 00:58:00, Charlie Reis wrote:
> > > On 2015/02/18 15:28:25, carlosk wrote:
> > > > On 2015/02/17 23:48:29, Charlie Reis wrote:
> > > > > Let's put a comment at the top of this function saying "This is a
> > > > > renderer-initiated navigation."  That part is implicit in the comment
> > below,
> > > > but
> > > > > it's worthwhile to call it out.
> > > > 
> > > > I thought it was better to actually rename the method. Should I also
> rename
> > > the
> > > > IPC and its handler method in RFHI?
> > > 
> > > No, I actually think the old OnBeginNavigation name was better, because it
> > > matches our OnFoo naming convention for IPC message handlers.  Please
change
> > it
> > > back.
> > > 
> > > A comment should be sufficient to call attention to that fact.
> > 
> > I reverted the rename and added the comment.
> > 
> > But please help me understand your reasoning. Why the old name when this
name
> is
> > clearer in stating what this method is actually meant for (now, after the
> > refactor)? I have nothing against comments but having an better suited
method
> > name is an order of magnitude better.
> > 
> > We could prefix this (or a similar) name with "On". As I stated I was also
> > willing to change the IPC/handler method names to make them match.
> 
> Sure, I'm happy to explain my reasoning:
> 
> Names are indeed important, and they should be clear, concise, and consistent
> with other names when possible.  I would argue that OnBeginNavigation
accurately
> describes a request from the renderer process to begin a navigation.
> 
> I would say that the name was misleading in the past, because it was also used
> for browser-initiated navigations.  That's no longer the case, so I don't
think
> we need the more verbose "RendererInitiatedNavigationRequest" (which is not
> consise nor consistent with our other method names).  Instead, the comment
seems
> sufficient to me for verifying that the name means what it sounds like.
> 
> Hope that helps.

Acknowledged. Thanks.

Powered by Google App Engine
This is Rietveld 408576698