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

Issue 155897: Add support to URLRequest for deferring redirects.... (Closed)

Created:
11 years, 5 months ago by darin (slow to review)
Modified:
9 years, 7 months ago
Reviewers:
eroman, wtc
CC:
chromium-reviews_googlegroups.com, brettw, jam, willchan no longer on Chromium, Ben Goodger (Google)
Visibility:
Public.

Description

Add support to URLRequest for deferring redirects. I chose to add an out parameter to OnReceivedRedirect because it allows for the default behavior to remain the same. I considered adding a ContinueAfterRedirect method that all OnReceivedRedirect implementations would need to call, but this caused one annoying problem: In the case of a ChromePlugin, it is possible for the URLRequest to get deleted inside the handler for the redirect. This would make it hard to subsequently call a method on the URLRequest since I would need to have a way to determine if the URLRequest had been deleted. TEST=covered by unit tests BUG=16413, 6442 R=eroman,wtc Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=21417

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 34

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+169 lines, -63 lines) Patch
M chrome/browser/chrome_plugin_host.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/net/url_fetcher.cc View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/plugin_process_host.cc View 1 2 3 4 2 chunks +0 lines, -6 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/common/chrome_plugin_unittest.cc View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M net/proxy/proxy_script_fetcher.cc View 1 2 3 4 2 chunks +0 lines, -7 lines 0 comments Download
M net/tools/testserver/testserver.py View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M net/url_request/url_request.h View 1 2 3 4 3 chunks +16 lines, -4 lines 3 comments Download
M net/url_request/url_request.cc View 1 2 3 4 6 chunks +12 lines, -3 lines 0 comments Download
M net/url_request/url_request_job.h View 1 2 3 4 6 chunks +12 lines, -6 lines 2 comments Download
M net/url_request/url_request_job.cc View 1 2 3 4 7 chunks +30 lines, -22 lines 0 comments Download
M net/url_request/url_request_unittest.h View 1 2 3 4 4 chunks +10 lines, -2 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 4 6 chunks +77 lines, -5 lines 0 comments Download
M webkit/tools/test_shell/simple_resource_loader_bridge.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 13 (0 generated)
darin (slow to review)
11 years, 5 months ago (2009-07-21 23:59:29 UTC) #1
darin (slow to review)
sending to eroman for review since wtc is away today...
11 years, 5 months ago (2009-07-22 20:49:59 UTC) #2
eroman
lgtm <side_comment> There might be other bugs IDs linked to this. I remember safe-browsing had ...
11 years, 5 months ago (2009-07-22 21:42:22 UTC) #3
wtc
I found issue 11256 and issue 5131 on the issue of safebrowsing and redirect. Paul ...
11 years, 5 months ago (2009-07-22 21:53:42 UTC) #4
wtc
LGTM, but I have some nits and minor questions below. My comments on two issues ...
11 years, 5 months ago (2009-07-22 22:44:01 UTC) #5
darin (slow to review)
Thanks for the great feedback!! > 1. I didn't know why you provided a no-op ...
11 years, 5 months ago (2009-07-22 23:35:34 UTC) #6
wtc
LGTM. http://codereview.chromium.org/155897/diff/22/30 File net/url_request/url_request.cc (left): http://codereview.chromium.org/155897/diff/22/30#oldcode423 Line 423: status_ = URLRequestStatus(); On 2009/07/22 23:35:34, darin ...
11 years, 5 months ago (2009-07-23 00:30:11 UTC) #7
darin (slow to review)
http://codereview.chromium.org/155897/diff/22/30 File net/url_request/url_request.cc (left): http://codereview.chromium.org/155897/diff/22/30#oldcode423 Line 423: status_ = URLRequestStatus(); > OK, so this explains ...
11 years, 5 months ago (2009-07-23 01:27:29 UTC) #8
wtc
http://codereview.chromium.org/155897/diff/64/1093 File net/url_request/url_request.h (right): http://codereview.chromium.org/155897/diff/64/1093#newcode144 Line 144: // The default value for |*defer_redirect| is false, ...
11 years, 5 months ago (2009-07-23 02:37:47 UTC) #9
wtc
http://codereview.chromium.org/155897/diff/22/30 File net/url_request/url_request.cc (left): http://codereview.chromium.org/155897/diff/22/30#oldcode423 Line 423: status_ = URLRequestStatus(); On 2009/07/23 01:27:29, darin wrote: ...
11 years, 5 months ago (2009-07-23 02:47:42 UTC) #10
darin (slow to review)
http://codereview.chromium.org/155897/diff/22/30 File net/url_request/url_request.cc (left): http://codereview.chromium.org/155897/diff/22/30#oldcode423 Line 423: status_ = URLRequestStatus(); > But you already added ...
11 years, 5 months ago (2009-07-23 05:26:27 UTC) #11
darin (slow to review)
On the subject of returning an enum, I think I prefer the out parameter because ...
11 years, 5 months ago (2009-07-23 16:50:18 UTC) #12
eroman
11 years, 5 months ago (2009-07-23 17:55:51 UTC) #13
lgtm

Powered by Google App Engine
This is Rietveld 408576698