Remove WebContentsImpl::OnDidRedirectProvisionalLoad.
Also remove the associated ViewHostMsg, and remove
RenderViewImpl::didReceiveServerRedirectForProvisonalLoad, since it only
served to send that message.
BUG=78512
TEST=builds; cbentzel will try
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=141066
Initial thought - it looks like you did remove the OnDidRedirectProvisionalLoad hooks correctly functionality, but ...
8 years, 7 months ago
(2012-05-03 19:56:45 UTC)
#4
Initial thought - it looks like you did remove the OnDidRedirectProvisionalLoad
hooks correctly functionality, but didn't change the prerender code to listen to
the RESOURCE_RECEIVED_REDIRECT notification. This likely means that prerenders
won't work correctly. I'll run a try job and this should show up. Alternately
you could build the browser_tests target and run it with
--gtest_filter=*PrerenderBrowserTest
cbentzel
One other nit - you can just do BUG=78512
8 years, 7 months ago
(2012-05-03 19:57:14 UTC)
#5
One other nit - you can just do BUG=78512
cbentzel
On 2012/05/03 19:57:14, cbentzel wrote: > One other nit - you can just do BUG=78512 ...
8 years, 7 months ago
(2012-05-05 00:18:35 UTC)
#6
On 2012/05/03 19:57:14, cbentzel wrote:
> One other nit - you can just do BUG=78512
Quick suggestion: add a reply to the code review when you update it with fixes,
otherwise I may forget it.
Overall this looks fine. I'll re-try it before asking you to get OWNERS
approval.
cbentzel
http://codereview.chromium.org/10316020/diff/6001/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (left): http://codereview.chromium.org/10316020/diff/6001/content/browser/web_contents/web_contents_impl.cc#oldcode1556 content/browser/web_contents/web_contents_impl.cc:1556: ProvisionalChangeToMainFrameUrl(validated_target_url, You should remove ProvisionalChangeToMainFrameUrl in this CL.
8 years, 7 months ago
(2012-05-08 04:29:09 UTC)
#7
And sorry for my super-slow turnaround time on this CL. You may want to ask ...
8 years, 7 months ago
(2012-05-08 04:38:40 UTC)
#8
And sorry for my super-slow turnaround time on this CL. You may want to ask
mmenke or gavinp to take over as I don't expect that I'll have much time to look
at it this week.
Deprecated (see juliatuttle)
Hey, I removed ProvisionalChangeToMainFrameUrl. Please take a look now.
8 years, 7 months ago
(2012-05-14 22:24:52 UTC)
#9
Hey, I removed ProvisionalChangeToMainFrameUrl. Please take a look now.
cbentzel
THe method should also be removed from WebContentsObserver
8 years, 7 months ago
(2012-05-15 17:33:06 UTC)
#10
THe method should also be removed from WebContentsObserver
Deprecated (see juliatuttle)
Argh. I could've *sworn* I removed that. I remember removing it. Oh well. Done.
8 years, 7 months ago
(2012-05-15 18:16:25 UTC)
#11
Argh. I could've *sworn* I removed that. I remember removing it. Oh well.
Done.
cbentzel
This comment is for myself. I am not sure if you can get away with ...
8 years, 7 months ago
(2012-05-15 20:26:58 UTC)
#12
This comment is for myself. I am not sure if you can get away with removing the
functionality in PrerenderTabHelper. If you can't, you can refactor that class
to listen to RESOURCE_RECEIVED_REDIRECT notifications (essentially, a pub-sub
system). See http://codereview.chromium.org/6824054 for a CL which did that.
However, if we can get rid of some of this functionality, let's do it.
http://codereview.chromium.org/10316020/diff/18001/chrome/browser/prerender/p...
File chrome/browser/prerender/prerender_tab_helper.cc (left):
http://codereview.chromium.org/10316020/diff/18001/chrome/browser/prerender/p...
chrome/browser/prerender/prerender_tab_helper.cc:48:
RecordPageviewEvent(PAGEVIEW_EVENT_NEW_URL);
Note to self: I'm not sure we can get rid of this functionality, although it is
not being tested right now. See if this needs to use RESOURCE_RECEIVED_REDIRECT
notification instead.
cbentzel
OK, as I discussed with you in person, I think the fastest way to get ...
8 years, 7 months ago
(2012-05-16 00:53:01 UTC)
#13
OK, as I discussed with you in person, I think the fastest way to get this in
is to make PrerenderTabHelper work the same as before, but just use the
RESOURCE_RECEIVED_REDIRECT notification. I can do a separate pass to remove some
of the existing functionality.
On 2012/05/15 20:26:58, cbentzel wrote:
> This comment is for myself. I am not sure if you can get away with removing
the
> functionality in PrerenderTabHelper. If you can't, you can refactor that class
> to listen to RESOURCE_RECEIVED_REDIRECT notifications (essentially, a pub-sub
> system). See http://codereview.chromium.org/6824054 for a CL which did that.
>
> However, if we can get rid of some of this functionality, let's do it.
>
>
http://codereview.chromium.org/10316020/diff/18001/chrome/browser/prerender/p...
> File chrome/browser/prerender/prerender_tab_helper.cc (left):
>
>
http://codereview.chromium.org/10316020/diff/18001/chrome/browser/prerender/p...
> chrome/browser/prerender/prerender_tab_helper.cc:48:
> RecordPageviewEvent(PAGEVIEW_EVENT_NEW_URL);
> Note to self: I'm not sure we can get rid of this functionality, although it
is
> not being tested right now. See if this needs to use
RESOURCE_RECEIVED_REDIRECT
> notification instead.
Deprecated (see juliatuttle)
Now listens for RESOURCE_RECEIVED_REDIRET in PrerenderTabHelper. Not tested, because there are no tests for it, ...
8 years, 7 months ago
(2012-05-17 17:24:35 UTC)
#14
Now listens for RESOURCE_RECEIVED_REDIRET in PrerenderTabHelper. Not tested,
because there are no tests for it, and I can't think of an easy way to test it
manually. Suggestions welcome :)
cbentzel
Thanks. LGTM. You'll also need OWNERS approval from other folks, and I will also run ...
8 years, 7 months ago
(2012-05-17 17:42:39 UTC)
#15
On 2012/05/30 22:50:43, Matt Menke wrote: > After this CL, the NavigationController will no longer ...
8 years, 6 months ago
(2012-05-31 16:11:10 UTC)
#26
On 2012/05/30 22:50:43, Matt Menke wrote:
> After this CL, the NavigationController will no longer receive any
notification
> on redirects, it looks to me, and thus can't update its title in response to
the
> redirect.
That doesn't explain whether we will catch regressions of the two vulnerability
fixes. I'll have to patch this in to a local build to understand how it
interacts with those. I'll follow up in a bit.
Charlie Reis
https://chromiumcodereview.appspot.com/10316020/diff/26001/content/browser/web_contents/navigation_controller_impl_unittest.cc File content/browser/web_contents/navigation_controller_impl_unittest.cc (left): https://chromiumcodereview.appspot.com/10316020/diff/26001/content/browser/web_contents/navigation_controller_impl_unittest.cc#oldcode526 content/browser/web_contents/navigation_controller_impl_unittest.cc:526: kRedirectURL)); // new url On 2012/05/30 22:50:43, Matt Menke ...
8 years, 6 months ago
(2012-05-31 16:56:26 UTC)
#27
https://chromiumcodereview.appspot.com/10316020/diff/26001/content/browser/we...
File content/browser/web_contents/navigation_controller_impl_unittest.cc (left):
https://chromiumcodereview.appspot.com/10316020/diff/26001/content/browser/we...
content/browser/web_contents/navigation_controller_impl_unittest.cc:526:
kRedirectURL)); // new url
On 2012/05/30 22:50:43, Matt Menke wrote:
> On 2012/05/30 22:43:31, creis wrote:
> > I don't understand. Doesn't this just remove the redirect (which is the
> > relevant part of the test)?
> >
> > More specifically, does this modified version of the test fail if you undo
the
> > security fix from the patch below?
> >
>
http://codereview.chromium.org/6993037/diff/8001/content/browser/tab_contents...
>
> After this CL, the NavigationController will no longer receive any
notification
> on redirects, it looks to me, and thus can't update its title in response to
the
> redirect.
Ok, I experimentally verified that this updated test still catches regressions
for 83031. That is, it fails if I re-introduce the bug into
WebContentsImpl::OnDidFailProvisionalLoadWithError.
Please update the comment on line 519 to also say that the RVH gets no
notification of the redirect, since the code is confusing as it stands.
https://chromiumcodereview.appspot.com/10316020/diff/26001/content/browser/we...
File content/browser/web_contents/navigation_controller_impl_unittest.cc
(right):
https://chromiumcodereview.appspot.com/10316020/diff/26001/content/browser/we...
content/browser/web_contents/navigation_controller_impl_unittest.cc:524:
//EXPECT_EQ(kNewURL, controller.GetPendingEntry()->GetURL());
On 2012/05/30 22:43:31, creis wrote:
> Shouldn't have commented out code. But again, this is a security bug
regression
> test you're removing. Maybe I don't understand what you're trying to achieve.
> Is there a reason it's safe not to have these checks?
This is unfortunate. I'd like to keep this line in case the bug comes back
elsewhere, but it's kind of meaningless without actually simulating a redirect.
The only way I know to do that is with
ResourceDispatcherHost::NotifyReceivedRedirect, which isn't available in this
unit test.
I suppose it makes the most sense to remove this line. You've removed the whole
method that contained the bug, so it's unlikely to regress.
mmenke
One option would be to switch to a BrowserTest, and go through the whole redirect ...
8 years, 6 months ago
(2012-05-31 17:19:38 UTC)
#28
One option would be to switch to a BrowserTest, and go through the whole
redirect process, though since the main concern is with the cross-domain case,
that makes the test a little tricky.
On 2012/05/31 16:56:26, creis wrote:
>
https://chromiumcodereview.appspot.com/10316020/diff/26001/content/browser/we...
> File content/browser/web_contents/navigation_controller_impl_unittest.cc
(left):
>
>
https://chromiumcodereview.appspot.com/10316020/diff/26001/content/browser/we...
> content/browser/web_contents/navigation_controller_impl_unittest.cc:526:
> kRedirectURL)); // new url
> On 2012/05/30 22:50:43, Matt Menke wrote:
> > On 2012/05/30 22:43:31, creis wrote:
> > > I don't understand. Doesn't this just remove the redirect (which is the
> > > relevant part of the test)?
> > >
> > > More specifically, does this modified version of the test fail if you undo
> the
> > > security fix from the patch below?
> > >
> >
>
http://codereview.chromium.org/6993037/diff/8001/content/browser/tab_contents...
> >
> > After this CL, the NavigationController will no longer receive any
> notification
> > on redirects, it looks to me, and thus can't update its title in response to
> the
> > redirect.
>
> Ok, I experimentally verified that this updated test still catches regressions
> for 83031. That is, it fails if I re-introduce the bug into
> WebContentsImpl::OnDidFailProvisionalLoadWithError.
>
> Please update the comment on line 519 to also say that the RVH gets no
> notification of the redirect, since the code is confusing as it stands.
>
>
https://chromiumcodereview.appspot.com/10316020/diff/26001/content/browser/we...
> File content/browser/web_contents/navigation_controller_impl_unittest.cc
> (right):
>
>
https://chromiumcodereview.appspot.com/10316020/diff/26001/content/browser/we...
> content/browser/web_contents/navigation_controller_impl_unittest.cc:524:
> //EXPECT_EQ(kNewURL, controller.GetPendingEntry()->GetURL());
> On 2012/05/30 22:43:31, creis wrote:
> > Shouldn't have commented out code. But again, this is a security bug
> regression
> > test you're removing. Maybe I don't understand what you're trying to
achieve.
>
> > Is there a reason it's safe not to have these checks?
>
> This is unfortunate. I'd like to keep this line in case the bug comes back
> elsewhere, but it's kind of meaningless without actually simulating a
redirect.
> The only way I know to do that is with
> ResourceDispatcherHost::NotifyReceivedRedirect, which isn't available in this
> unit test.
>
> I suppose it makes the most sense to remove this line. You've removed the
whole
> method that contained the bug, so it's unlikely to regress.
Deprecated (see juliatuttle)
https://chromiumcodereview.appspot.com/10316020/diff/26001/content/browser/web_contents/navigation_controller_impl_unittest.cc File content/browser/web_contents/navigation_controller_impl_unittest.cc (right): https://chromiumcodereview.appspot.com/10316020/diff/26001/content/browser/web_contents/navigation_controller_impl_unittest.cc#newcode524 content/browser/web_contents/navigation_controller_impl_unittest.cc:524: //EXPECT_EQ(kNewURL, controller.GetPendingEntry()->GetURL()); On 2012/05/31 16:56:27, creis wrote: > On ...
8 years, 6 months ago
(2012-05-31 18:16:24 UTC)
#29
https://chromiumcodereview.appspot.com/10316020/diff/26001/content/browser/we...
File content/browser/web_contents/navigation_controller_impl_unittest.cc
(right):
https://chromiumcodereview.appspot.com/10316020/diff/26001/content/browser/we...
content/browser/web_contents/navigation_controller_impl_unittest.cc:524:
//EXPECT_EQ(kNewURL, controller.GetPendingEntry()->GetURL());
On 2012/05/31 16:56:27, creis wrote:
> On 2012/05/30 22:43:31, creis wrote:
> > Shouldn't have commented out code. But again, this is a security bug
> regression
> > test you're removing. Maybe I don't understand what you're trying to
achieve.
>
> > Is there a reason it's safe not to have these checks?
>
> This is unfortunate. I'd like to keep this line in case the bug comes back
> elsewhere, but it's kind of meaningless without actually simulating a
redirect.
> The only way I know to do that is with
> ResourceDispatcherHost::NotifyReceivedRedirect, which isn't available in this
> unit test.
>
> I suppose it makes the most sense to remove this line. You've removed the
whole
> method that contained the bug, so it's unlikely to regress.
Done.
Charlie Reis
Thanks, LGTM.
8 years, 6 months ago
(2012-05-31 18:21:46 UTC)
#30
Thanks, LGTM.
cbentzel
Thanks for confirming this, Charlie. I'll run a try job first. After that, Thomas, I ...
8 years, 6 months ago
(2012-05-31 18:26:02 UTC)
#31
Thomas - you'll need to merge/rebase relative to trunk.
8 years, 6 months ago
(2012-06-01 13:50:16 UTC)
#32
Thomas - you'll need to merge/rebase relative to trunk.
Deprecated (see juliatuttle)
PTAL.
8 years, 6 months ago
(2012-06-05 20:24:32 UTC)
#33
PTAL.
cbentzel
LGTM http://codereview.chromium.org/10316020/diff/41001/chrome/browser/prerender/prerender_tab_helper.cc File chrome/browser/prerender/prerender_tab_helper.cc (right): http://codereview.chromium.org/10316020/diff/41001/chrome/browser/prerender/prerender_tab_helper.cc#newcode259 chrome/browser/prerender/prerender_tab_helper.cc:259: int type, Nit: these arguments should only be ...
8 years, 6 months ago
(2012-06-06 14:54:42 UTC)
#34
8 years, 6 months ago
(2012-06-07 02:02:32 UTC)
#35
Fixed indentation; am I good to commit this?
cbentzel
On 2012/06/07 02:02:32, ttuttle wrote: > Fixed indentation; am I good to commit this? Yes. ...
8 years, 6 months ago
(2012-06-07 02:12:53 UTC)
#36
On 2012/06/07 02:02:32, ttuttle wrote:
> Fixed indentation; am I good to commit this?
Yes.
When a LGTM is given, along with some nits, it generally means "You don't need
to ask me for approval again, assuming you address these issues below".
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ttuttle@chromium.org/10316020/41004
8 years, 6 months ago
(2012-06-07 17:14:41 UTC)
#37
Issue 10316020: Remove WebContentsImpl::OnDidRedirectProvisionalLoad.
(Closed)
Created 8 years, 7 months ago by Deprecated (see juliatuttle)
Modified 8 years, 6 months ago
Reviewers: cbentzel, Charlie Reis, jam
Base URL: svn://svn.chromium.org/chrome/trunk/src
Comments: 18