Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(38)

Issue 16546: Blocking resource request for hidden page when interstitial showing (Closed)

Created:
10 years, 7 months ago by jcampan
Modified:
8 years, 3 months ago
Reviewers:
Paul Godavari
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

This CL adds a way to block resource requests in the ResourceDispatcherHost for specific RenderViewHosts. This is used by the interstitial code to prevent the original page from making network requests while the interstitial is showing. Several UI tests are still required to test this. Because of the inherent complexity of the scenarios to test this, I'm afraid these tests are going to be flakey and soon after disabled (like many of the interstitial UI tests at this point). This will be done next as part of my next effort to mock some of the WebContents stuff. TEST=Run the unit tests. Create a page that does XMLHttpRequests and log when the requests complete with the time it did. While that page is shown, switch to a malware/bad SSL page. Come back to the page, ensure no requests were processed while the interstitial was showing. BUG=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=7898

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 18

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 1

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+432 lines, -38 lines) Patch
M chrome/browser/interstitial_page.h View 4 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/interstitial_page.cc View 1 2 3 4 7 chunks +124 lines, -20 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.h View 1 2 7 chunks +41 lines, -5 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 1 2 4 chunks +103 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc View 1 2 8 chunks +154 lines, -12 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
jcampan
10 years, 7 months ago (2009-01-06 22:35:55 UTC) #1
Paul Godavari
http://codereview.chromium.org/16546/diff/207/208 File chrome/browser/interstitial_page.cc (right): http://codereview.chromium.org/16546/diff/207/208#newcode20 Line 20: namespace { Nit: Don't need to indent inside ...
10 years, 7 months ago (2009-01-07 00:16:29 UTC) #2
jcampan
http://codereview.chromium.org/16546/diff/207/208 File chrome/browser/interstitial_page.cc (right): http://codereview.chromium.org/16546/diff/207/208#newcode20 Line 20: namespace { On 2009/01/07 00:16:29, Paul Godavari wrote: ...
10 years, 7 months ago (2009-01-07 23:56:55 UTC) #3
Paul Godavari
10 years, 7 months ago (2009-01-08 20:34:32 UTC) #4
LGTM, with one clean up comment:

http://codereview.chromium.org/16546/diff/218/27
File chrome/browser/renderer_host/resource_dispatcher_host.cc (right):

http://codereview.chromium.org/16546/diff/218/27#newcode143
Line 143: // blocked_requests_map_, as it modifies it.
Nit: this block of code is almost identical to the one in
CancelRequestsForRenderView. It would be great if this was a helper function
that could be used in both places.

Powered by Google App Engine
This is Rietveld 408576698