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

Issue 686343002: Add MaybeInterceptRedirect/Response to URLRequestInterceptor (Closed)

Created:
6 years, 1 month ago by bengr
Modified:
6 years, 1 month ago
CC:
chromium-reviews, davidben+watch_chromium.org, extensions-reviews_chromium.org, cbentzel+watch_chromium.org, nkostylev+watch_chromium.org, tzik, tburkard+watch_chromium.org, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, jsbell+serviceworker_chromium.org, gavinp+prer_chromium.org, darin-cc_chromium.org, jkarlin+watch_chromium.org, oshima+watch_chromium.org, horo+watch_chromium.org, chromium-apps-reviews_chromium.org, stevenjb+watch_chromium.org, kinuko+fileapi, davemoore+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Adds MaybeInterceptRedirect and MaybeInterceptResponse to the URLRequestInterceptor interface as well as to URLRequestJobFactory. BUG=429505 Committed: https://crrev.com/1bf8e9456a103d086f53400bdc169c437a1590a4 Cr-Commit-Position: refs/heads/master@{#303154}

Patch Set 1 : #

Total comments: 7

Patch Set 2 : added webview #

Total comments: 2

Patch Set 3 : Added tests, removed DRP #

Total comments: 2

Patch Set 4 : fixed build #

Total comments: 48

Patch Set 5 : Added default implementations for URLRequestInterceptor #

Total comments: 2

Patch Set 6 : Addressed comments from mmenke #

Total comments: 2

Patch Set 7 : Addressed next_states_ #

Total comments: 2

Patch Set 8 : Used nullptr #

Patch Set 9 : missed one nullptr #

Patch Set 10 : Chained factory interfaces #

Total comments: 14

Patch Set 11 : removed inline #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1071 lines, -46 lines) Patch
M android_webview/browser/net/aw_url_request_job_factory.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +11 lines, -1 line 0 comments Download
M android_webview/browser/net/aw_url_request_job_factory.cc View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/fileapi/external_file_url_request_job_unittest.cc View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
M chrome/browser/custom_handlers/protocol_handler_registry.h View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/custom_handlers/protocol_handler_registry.cc View 1 2 3 4 5 6 7 8 9 1 chunk +16 lines, -0 lines 0 comments Download
M chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc View 1 2 3 4 5 6 7 1 chunk +14 lines, -0 lines 0 comments Download
M content/browser/appcache/appcache_request_handler_unittest.cc View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
M content/browser/appcache/appcache_url_request_job_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +13 lines, -0 lines 0 comments Download
M content/browser/fileapi/file_system_dir_url_request_job_unittest.cc View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
M content/browser/fileapi/file_system_url_request_job_unittest.cc View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
M content/browser/fileapi/file_writer_delegate_unittest.cc View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_unittest.cc View 1 2 3 4 5 6 7 2 chunks +22 lines, -0 lines 0 comments Download
A + net/data/url_request_unittest/simple.html View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A + net/data/url_request_unittest/simple.html.mock-http-headers View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A + net/data/url_request_unittest/two-content-lengths.html View 1 2 0 chunks +-1 lines, --1 lines 0 comments Download
A + net/data/url_request_unittest/two-content-lengths.html.mock-http-headers View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M net/url_request/url_request_file_job_unittest.cc View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
M net/url_request/url_request_intercepting_job_factory.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M net/url_request/url_request_intercepting_job_factory.cc View 1 2 1 chunk +27 lines, -0 lines 0 comments Download
M net/url_request/url_request_interceptor.h View 1 2 3 4 2 chunks +16 lines, -0 lines 0 comments Download
M net/url_request/url_request_interceptor.cc View 1 2 3 4 5 6 7 1 chunk +12 lines, -0 lines 0 comments Download
M net/url_request/url_request_job_factory.h View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M net/url_request/url_request_job_factory_impl.h View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M net/url_request/url_request_job_factory_impl.cc View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
M net/url_request/url_request_job_manager.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +14 lines, -0 lines 0 comments Download
M net/url_request/url_request_test_util.h View 1 2 3 4 5 3 chunks +9 lines, -0 lines 0 comments Download
M net/url_request/url_request_test_util.cc View 1 2 3 4 5 6 4 chunks +11 lines, -6 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 4 5 6 7 8 9 10 16 chunks +761 lines, -41 lines 0 comments Download

Messages

Total messages: 55 (15 generated)
mmenke
Only looked at the net/ code, but this is just what I had in mind ...
6 years, 1 month ago (2014-10-30 19:59:24 UTC) #4
bengr
https://codereview.chromium.org/686343002/diff/40001/net/url_request/url_request_intercepting_job_factory.cc File net/url_request/url_request_intercepting_job_factory.cc (right): https://codereview.chromium.org/686343002/diff/40001/net/url_request/url_request_intercepting_job_factory.cc#newcode39 net/url_request/url_request_intercepting_job_factory.cc:39: network_delegate); On 2014/10/30 19:59:24, mmenke wrote: > These aren't ...
6 years, 1 month ago (2014-10-31 00:45:31 UTC) #5
michaeln1
https://codereview.chromium.org/686343002/diff/40001/net/url_request/url_request_job_manager.cc File net/url_request/url_request_job_manager.cc (right): https://codereview.chromium.org/686343002/diff/40001/net/url_request/url_request_job_manager.cc#newcode132 net/url_request/url_request_job_manager.cc:132: request, network_delegate, location); On 2014/10/30 19:59:24, mmenke wrote: > ...
6 years, 1 month ago (2014-10-31 00:47:10 UTC) #7
mmenke
On 2014/10/31 00:47:10, michaeln1 wrote: > https://codereview.chromium.org/686343002/diff/40001/net/url_request/url_request_job_manager.cc > File net/url_request/url_request_job_manager.cc (right): > > https://codereview.chromium.org/686343002/diff/40001/net/url_request/url_request_job_manager.cc#newcode132 > ...
6 years, 1 month ago (2014-10-31 00:55:42 UTC) #8
mmenke
On 2014/10/31 00:55:42, mmenke wrote: > On 2014/10/31 00:47:10, michaeln1 wrote: > > > https://codereview.chromium.org/686343002/diff/40001/net/url_request/url_request_job_manager.cc ...
6 years, 1 month ago (2014-10-31 01:05:05 UTC) #9
mmenke
On 2014/10/31 01:05:05, mmenke wrote: > On 2014/10/31 00:55:42, mmenke wrote: > > On 2014/10/31 ...
6 years, 1 month ago (2014-10-31 01:28:00 UTC) #10
mmenke
On 2014/10/31 01:28:00, mmenke wrote: > On 2014/10/31 01:05:05, mmenke wrote: > > On 2014/10/31 ...
6 years, 1 month ago (2014-10-31 02:23:02 UTC) #11
mmenke
On 2014/10/31 02:23:02, mmenke wrote: > On 2014/10/31 01:28:00, mmenke wrote: > > On 2014/10/31 ...
6 years, 1 month ago (2014-10-31 17:52:06 UTC) #12
chromium-reviews
I've never fully understood the motivation to get rid of ability to restart or the ...
6 years, 1 month ago (2014-10-31 19:19:11 UTC) #13
mmenke
On 2014/10/31 19:19:11, chromium-reviews wrote: > I've never fully understood the motivation to get rid ...
6 years, 1 month ago (2014-10-31 19:27:52 UTC) #14
mmenke
On 2014/10/31 19:27:52, mmenke wrote: > On 2014/10/31 19:19:11, chromium-reviews wrote: > > I've never ...
6 years, 1 month ago (2014-10-31 19:29:15 UTC) #15
michaeln1
I see... oddness with NetworkDelegates. > The main reason is they result in the NetworkDelegates ...
6 years, 1 month ago (2014-10-31 20:00:46 UTC) #16
mmenke
On 2014/10/31 20:00:46, michaeln1 wrote: > I see... oddness with NetworkDelegates. > > > The ...
6 years, 1 month ago (2014-10-31 20:22:40 UTC) #17
bengr
sgurun: android_webview/* mtomasz: chrome/browser/chromeos/* thestig: chrome/browser/custom_handlers/*, chrome_browser_errorpage_browsertest.cc yoz: chrome/browser/extensions/* mmenke: chrome/browser/net/*, content/browser/loader/*, net/* joaodasilva: chrome/browser/policy/* ...
6 years, 1 month ago (2014-11-05 02:03:37 UTC) #21
mtomasz
On 2014/11/05 02:03:37, bengr wrote: > sgurun: android_webview/* > > mtomasz: chrome/browser/chromeos/* > > thestig: ...
6 years, 1 month ago (2014-11-05 02:06:25 UTC) #22
mtomasz
https://codereview.chromium.org/686343002/diff/120001/net/data/url_request_unittest/two-content-lengths.html.mock-http-headers File net/data/url_request_unittest/two-content-lengths.html.mock-http-headers (right): https://codereview.chromium.org/686343002/diff/120001/net/data/url_request_unittest/two-content-lengths.html.mock-http-headers#newcode4 net/data/url_request_unittest/two-content-lengths.html.mock-http-headers:4: Content-Length: 41 The header seems doubled. Is it OK?
6 years, 1 month ago (2014-11-05 02:08:34 UTC) #23
bengr
https://codereview.chromium.org/686343002/diff/120001/net/data/url_request_unittest/two-content-lengths.html.mock-http-headers File net/data/url_request_unittest/two-content-lengths.html.mock-http-headers (right): https://codereview.chromium.org/686343002/diff/120001/net/data/url_request_unittest/two-content-lengths.html.mock-http-headers#newcode4 net/data/url_request_unittest/two-content-lengths.html.mock-http-headers:4: Content-Length: 41 On 2014/11/05 02:08:34, mtomasz wrote: > The ...
6 years, 1 month ago (2014-11-05 02:13:20 UTC) #24
Lei Zhang
Have you considered providing a default implementation for MaybeInterceptFoo(), instead of having many impls where ...
6 years, 1 month ago (2014-11-05 02:39:00 UTC) #25
bengr
On 2014/11/05 02:39:00, Lei Zhang wrote: > Have you considered providing a default implementation for ...
6 years, 1 month ago (2014-11-05 03:14:07 UTC) #26
Joao da Silva
policy/ lgtm
6 years, 1 month ago (2014-11-05 09:22:17 UTC) #29
mmenke
On 2014/11/05 03:14:07, bengr wrote: > On 2014/11/05 02:39:00, Lei Zhang wrote: > > Have ...
6 years, 1 month ago (2014-11-05 16:25:38 UTC) #30
bengr
On 2014/11/05 16:25:38, mmenke wrote: > On 2014/11/05 03:14:07, bengr wrote: > > On 2014/11/05 ...
6 years, 1 month ago (2014-11-05 18:17:06 UTC) #32
bengr
6 years, 1 month ago (2014-11-05 18:17:51 UTC) #34
Lei Zhang
chrome/ lgtm
6 years, 1 month ago (2014-11-05 18:41:17 UTC) #35
mmenke
https://codereview.chromium.org/686343002/diff/180001/net/url_request/url_request_test_util.h File net/url_request/url_request_test_util.h (right): https://codereview.chromium.org/686343002/diff/180001/net/url_request/url_request_test_util.h#newcode376 net/url_request/url_request_test_util.h:376: bool can_be_intercepted_on_error_; Maybe rename to will_be_intercepted_on_next_error_, and set next_states_[req_id] ...
6 years, 1 month ago (2014-11-05 18:43:45 UTC) #36
sgurun-gerrit only
On 2014/11/05 18:17:51, bengr wrote: aw lgtm
6 years, 1 month ago (2014-11-05 19:06:52 UTC) #37
mmenke
Think this is looking really good. https://codereview.chromium.org/686343002/diff/220001/net/url_request/url_request_unittest.cc File net/url_request/url_request_unittest.cc (right): https://codereview.chromium.org/686343002/diff/220001/net/url_request/url_request_unittest.cc#newcode7150 net/url_request/url_request_unittest.cc:7150: void HTTPRedirectMethodTest(const GURL& ...
6 years, 1 month ago (2014-11-05 20:52:49 UTC) #38
bengr
https://codereview.chromium.org/686343002/diff/180001/net/url_request/url_request_test_util.h File net/url_request/url_request_test_util.h (right): https://codereview.chromium.org/686343002/diff/180001/net/url_request/url_request_test_util.h#newcode376 net/url_request/url_request_test_util.h:376: bool can_be_intercepted_on_error_; On 2014/11/05 18:43:43, mmenke wrote: > Maybe ...
6 years, 1 month ago (2014-11-05 22:51:39 UTC) #39
mmenke
Just a quick followup to your question about what I meant by my will_be_intercepted_on_next_error_ suggestion. ...
6 years, 1 month ago (2014-11-05 23:14:34 UTC) #40
bengr
https://codereview.chromium.org/686343002/diff/240001/net/url_request/url_request_test_util.cc File net/url_request/url_request_test_util.cc (right): https://codereview.chromium.org/686343002/diff/240001/net/url_request/url_request_test_util.cc#newcode415 net/url_request/url_request_test_util.cc:415: (will_be_intercepted_on_next_error_ ? kStageResponseStarted : 0); On 2014/11/05 23:14:34, mmenke ...
6 years, 1 month ago (2014-11-06 00:10:51 UTC) #41
mtomasz
https://codereview.chromium.org/686343002/diff/260001/chrome/browser/chromeos/fileapi/external_file_url_request_job_unittest.cc File chrome/browser/chromeos/fileapi/external_file_url_request_job_unittest.cc (right): https://codereview.chromium.org/686343002/diff/260001/chrome/browser/chromeos/fileapi/external_file_url_request_job_unittest.cc#newcode70 chrome/browser/chromeos/fileapi/external_file_url_request_job_unittest.cc:70: return NULL; nit: NULL -> nullptr per http://chromium-cpp.appspot.com/?
6 years, 1 month ago (2014-11-06 00:20:10 UTC) #42
mtomasz
On 2014/11/06 00:20:10, mtomasz wrote: > https://codereview.chromium.org/686343002/diff/260001/chrome/browser/chromeos/fileapi/external_file_url_request_job_unittest.cc > File chrome/browser/chromeos/fileapi/external_file_url_request_job_unittest.cc > (right): > > https://codereview.chromium.org/686343002/diff/260001/chrome/browser/chromeos/fileapi/external_file_url_request_job_unittest.cc#newcode70 ...
6 years, 1 month ago (2014-11-06 00:21:26 UTC) #43
bengr
https://codereview.chromium.org/686343002/diff/260001/chrome/browser/chromeos/fileapi/external_file_url_request_job_unittest.cc File chrome/browser/chromeos/fileapi/external_file_url_request_job_unittest.cc (right): https://codereview.chromium.org/686343002/diff/260001/chrome/browser/chromeos/fileapi/external_file_url_request_job_unittest.cc#newcode70 chrome/browser/chromeos/fileapi/external_file_url_request_job_unittest.cc:70: return NULL; On 2014/11/06 00:20:10, mtomasz wrote: > nit: ...
6 years, 1 month ago (2014-11-06 17:14:49 UTC) #44
mmenke
LGTM https://codereview.chromium.org/686343002/diff/320001/net/url_request/url_request_unittest.cc File net/url_request/url_request_unittest.cc (right): https://codereview.chromium.org/686343002/diff/320001/net/url_request/url_request_unittest.cc#newcode7071 net/url_request/url_request_unittest.cc:7071: nit: Remove blank line. https://codereview.chromium.org/686343002/diff/320001/net/url_request/url_request_unittest.cc#newcode7094 net/url_request/url_request_unittest.cc:7094: } nit: ...
6 years, 1 month ago (2014-11-06 18:49:37 UTC) #45
michaeln
https://codereview.chromium.org/686343002/diff/320001/android_webview/browser/net/aw_url_request_job_factory.h File android_webview/browser/net/aw_url_request_job_factory.h (right): https://codereview.chromium.org/686343002/diff/320001/android_webview/browser/net/aw_url_request_job_factory.h#newcode37 android_webview/browser/net/aw_url_request_job_factory.h:37: virtual net::URLRequestJob* MaybeInterceptRedirect( per new c++ 11 guidelines, just ...
6 years, 1 month ago (2014-11-06 21:07:46 UTC) #47
michaeln
lgtm with the ordering changed (just chatted with ben about that)
6 years, 1 month ago (2014-11-06 22:11:21 UTC) #48
bengr
https://codereview.chromium.org/686343002/diff/320001/android_webview/browser/net/aw_url_request_job_factory.h File android_webview/browser/net/aw_url_request_job_factory.h (right): https://codereview.chromium.org/686343002/diff/320001/android_webview/browser/net/aw_url_request_job_factory.h#newcode37 android_webview/browser/net/aw_url_request_job_factory.h:37: virtual net::URLRequestJob* MaybeInterceptRedirect( On 2014/11/06 21:07:46, michaeln wrote: > ...
6 years, 1 month ago (2014-11-06 23:58:02 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/686343002/370001
6 years, 1 month ago (2014-11-07 00:19:23 UTC) #53
commit-bot: I haz the power
Committed patchset #11 (id:370001)
6 years, 1 month ago (2014-11-07 01:37:10 UTC) #54
commit-bot: I haz the power
6 years, 1 month ago (2014-11-07 01:37:48 UTC) #55
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/1bf8e9456a103d086f53400bdc169c437a1590a4
Cr-Commit-Position: refs/heads/master@{#303154}

Powered by Google App Engine
This is Rietveld 408576698