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

Issue 1888963004: Add HttpProtocolHandler and convert everything to use it (Closed)

Created:
4 years, 8 months ago by mgersh
Modified:
3 years, 7 months ago
CC:
android-webview-reviews_chromium.org, cbentzel+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, jam, loading-reviews_chromium.org, Paweł Hajdan Jr.
Base URL:
https://chromium.googlesource.com/chromium/src.git@remove-supports-scheme
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add HttpProtocolHandler and convert everything to use it Previously, http/https/ws/wss URLRequestJobs were created directly by URLRequestJobManager, while all other URLRequestJobs were created by URLRequestJobFactory with a relevant ProtocolHandler. This change adds an HttpProtocolHandler and removes the special handling from URLRequestJobManager. It allows use cases where not all of these schemes are supported, and clears the way for removing URLRequestJobManager entirely. Currently, one HttpProtocolHandler is added for each scheme. Having one for multiple schemes would require changes to the way URLRequestJobFactoryImpl stores its protocol handlers. BUG=142945, 146591, 488166

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : fix more cases, also changed my mind about some things #

Patch Set 4 : rebase #

Patch Set 5 : forgot a scoped_ptr #

Patch Set 6 : hopefully fix compile errors #

Patch Set 7 : more compile errors #

Patch Set 8 : another rebase #

Patch Set 9 : even more rebase #

Total comments: 29

Patch Set 10 : address comments #

Patch Set 11 : more addressing comments #

Total comments: 10

Patch Set 12 : a few more small things #

Patch Set 13 : rebase (needs fixing) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+276 lines, -196 lines) Patch
M android_webview/browser/net/aw_url_request_job_factory.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -17 lines 0 comments Download
M chrome/browser/io_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/profiles/off_the_record_profile_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +6 lines, -6 lines 0 comments Download
M chromecast/browser/url_request_context_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -3 lines 0 comments Download
M components/cronet/ios/cronet_environment.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -3 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +5 lines, -3 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +7 lines, -5 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -4 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -3 lines 0 comments Download
M content/browser/loader/resource_loader_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +6 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_read_from_cache_job_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +8 lines, -5 lines 0 comments Download
M content/shell/browser/shell_url_request_context_getter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -2 lines 0 comments Download
M ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.mm View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -4 lines 0 comments Download
M ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_io_data.mm View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -2 lines 0 comments Download
M ios/chrome/browser/ios_chrome_io_thread.mm View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -3 lines 0 comments Download
M ios/crnet/crnet_environment.mm View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -4 lines 0 comments Download
M ios/web/shell/shell_url_request_context_getter.mm View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M net/cert_net/cert_net_fetcher_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M net/net.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M net/proxy/proxy_script_fetcher_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M net/spdy/spdy_test_util_common.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
A net/url_request/http_protocol_handler.h View 1 2 1 chunk +28 lines, -0 lines 0 comments Download
A net/url_request/http_protocol_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +45 lines, -0 lines 0 comments Download
M net/url_request/url_request_context_builder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +19 lines, -3 lines 0 comments Download
M net/url_request/url_request_ftp_job_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M net/url_request/url_request_http_job.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -5 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -24 lines 0 comments Download
M net/url_request/url_request_http_job_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +7 lines, -5 lines 0 comments Download
M net/url_request/url_request_job_factory_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M net/url_request/url_request_job_factory_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +24 lines, -2 lines 0 comments Download
M net/url_request/url_request_job_manager.h View 1 chunk +0 lines, -3 lines 0 comments Download
M net/url_request/url_request_job_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +0 lines, -43 lines 0 comments Download
M net/url_request/url_request_test_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +13 lines, -3 lines 0 comments Download
M net/url_request/url_request_test_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +16 lines, -2 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 17 chunks +28 lines, -24 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 27 (4 generated)
mgersh
PTAL. This depends on the other one I just sent. I'll add other owners later.
4 years, 8 months ago (2016-04-21 18:01:55 UTC) #3
mmenke
Preliminary comments. Plan to do a full pass tomorrow, which I'll do regardless of whether ...
4 years, 8 months ago (2016-04-21 20:58:01 UTC) #4
mmenke
LGTM https://codereview.chromium.org/1888963004/diff/160001/android_webview/browser/net/aw_url_request_context_getter.cc File android_webview/browser/net/aw_url_request_context_getter.cc (right): https://codereview.chromium.org/1888963004/diff/160001/android_webview/browser/net/aw_url_request_context_getter.cc#newcode118 android_webview/browser/net/aw_url_request_context_getter.cc:118: DCHECK(set_protocol); Maybe make AwURLRequestJobFactory::AwURLRequestJobFactory use CreateWithDefaultProtocolHandlers()? https://codereview.chromium.org/1888963004/diff/160001/android_webview/browser/net/aw_url_request_job_factory.cc File ...
4 years, 8 months ago (2016-04-22 18:37:53 UTC) #5
mmenke
Oops... NOT LGTM - forgot about my first set of comments. Like to take another ...
4 years, 8 months ago (2016-04-22 18:38:45 UTC) #6
mgersh
https://codereview.chromium.org/1888963004/diff/160001/android_webview/browser/net/aw_url_request_context_getter.cc File android_webview/browser/net/aw_url_request_context_getter.cc (right): https://codereview.chromium.org/1888963004/diff/160001/android_webview/browser/net/aw_url_request_context_getter.cc#newcode118 android_webview/browser/net/aw_url_request_context_getter.cc:118: DCHECK(set_protocol); On 2016/04/22 18:37:52, mmenke wrote: > Maybe make ...
4 years, 8 months ago (2016-04-22 20:27:15 UTC) #7
mmenke
Quick responses. https://codereview.chromium.org/1888963004/diff/160001/components/cronet/ios/cronet_environment.cc File components/cronet/ios/cronet_environment.cc (right): https://codereview.chromium.org/1888963004/diff/160001/components/cronet/ios/cronet_environment.cc#newcode356 components/cronet/ios/cronet_environment.cc:356: net::URLRequestJobFactoryImpl::CreateWithDefaultProtocolHandlers(); On 2016/04/22 20:27:15, mgersh wrote: > ...
4 years, 8 months ago (2016-04-22 20:41:04 UTC) #8
mgersh
https://codereview.chromium.org/1888963004/diff/160001/components/cronet/ios/cronet_environment.cc File components/cronet/ios/cronet_environment.cc (right): https://codereview.chromium.org/1888963004/diff/160001/components/cronet/ios/cronet_environment.cc#newcode356 components/cronet/ios/cronet_environment.cc:356: net::URLRequestJobFactoryImpl::CreateWithDefaultProtocolHandlers(); On 2016/04/22 20:41:04, mmenke wrote: > On 2016/04/22 ...
4 years, 7 months ago (2016-04-27 16:13:53 UTC) #9
mmenke
LGTM, just nits. Thanks for doing this! https://codereview.chromium.org/1888963004/diff/200001/content/browser/service_worker/service_worker_read_from_cache_job_unittest.cc File content/browser/service_worker/service_worker_read_from_cache_job_unittest.cc (right): https://codereview.chromium.org/1888963004/diff/200001/content/browser/service_worker/service_worker_read_from_cache_job_unittest.cc#newcode82 content/browser/service_worker/service_worker_read_from_cache_job_unittest.cc:82: std::move(test_job_factory_), base::WrapUnique(test_job_interceptor_))); ...
4 years, 7 months ago (2016-04-28 16:52:42 UTC) #10
mgersh
Thanks for reviewing! https://codereview.chromium.org/1888963004/diff/200001/content/browser/service_worker/service_worker_read_from_cache_job_unittest.cc File content/browser/service_worker/service_worker_read_from_cache_job_unittest.cc (right): https://codereview.chromium.org/1888963004/diff/200001/content/browser/service_worker/service_worker_read_from_cache_job_unittest.cc#newcode82 content/browser/service_worker/service_worker_read_from_cache_job_unittest.cc:82: std::move(test_job_factory_), base::WrapUnique(test_job_interceptor_))); On 2016/04/28 16:52:41, mmenke ...
4 years, 7 months ago (2016-04-28 20:36:30 UTC) #11
mgersh
creis: PTAL at content/ sdefresne: PTAL at components/ and ios/ sgurun: PTAL at android_webview/ skyostil: ...
4 years, 7 months ago (2016-04-28 20:48:03 UTC) #13
Charlie Reis
content/ LGTM
4 years, 7 months ago (2016-04-28 21:47:24 UTC) #14
sdefresne
components/ & ios/ lgtm
4 years, 7 months ago (2016-04-30 12:13:41 UTC) #15
sgurun-gerrit only
On 2016/04/30 12:13:41, sdefresne wrote: > components/ & ios/ lgtm aw lgtm
4 years, 7 months ago (2016-05-02 21:22:14 UTC) #16
Sami
headless/ lgtm
4 years, 7 months ago (2016-05-03 13:20:28 UTC) #17
slan
cast lgtm
4 years, 7 months ago (2016-05-05 18:37:39 UTC) #18
mmenke
Miriam: What's the status of this CL?
4 years, 6 months ago (2016-06-01 15:32:48 UTC) #19
maksims (do not use this acc)
On 2016/06/01 15:32:48, mmenke wrote: > Miriam: What's the status of this CL? I have ...
4 years, 4 months ago (2016-07-29 08:29:00 UTC) #20
sgurun-gerrit only
On 2016/07/29 08:29:00, maksims wrote: > On 2016/06/01 15:32:48, mmenke wrote: > > Miriam: What's ...
4 years, 4 months ago (2016-08-22 18:26:15 UTC) #21
alex clarke (OOO till 29th)
On 2016/08/22 18:26:15, sgurun wrote: > On 2016/07/29 08:29:00, maksims wrote: > > On 2016/06/01 ...
4 years, 4 months ago (2016-08-23 17:54:01 UTC) #22
mgersh
On 2016/08/23 17:54:01, alex clarke wrote: > On 2016/08/22 18:26:15, sgurun wrote: > > On ...
4 years, 4 months ago (2016-08-23 23:40:56 UTC) #23
sdefresne
Is this CL still pending or should it be closed?
3 years, 7 months ago (2017-05-03 09:09:19 UTC) #24
sgurun-gerrit only
On 2017/05/03 09:09:19, sdefresne wrote: > Is this CL still pending or should it be ...
3 years, 7 months ago (2017-05-03 20:02:53 UTC) #25
mgersh
3 years, 7 months ago (2017-05-03 22:14:49 UTC) #26
On 2017/05/03 20:02:53, sgurun wrote:
> On 2017/05/03 09:09:19, sdefresne wrote:
> > Is this CL still pending or should it be closed?
> 
> it should be closed IMO. I am getting uncomfortable LGTMing a CL and then let
it
> wait for a year on the principle that things may have changed since then

I agree that it's now too out of date to be all that useful anyway, so I'll
close it.

Powered by Google App Engine
This is Rietveld 408576698