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

Side by Side Diff: ios/web/shell/shell_url_request_context_getter.mm

Issue 1888963004: Add HttpProtocolHandler and convert everything to use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-supports-scheme
Patch Set: rebase (needs fixing) Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ios/crnet/crnet_environment.mm ('k') | net/cert_net/cert_net_fetcher_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ios/web/shell/shell_url_request_context_getter.h" 5 #include "ios/web/shell/shell_url_request_context_getter.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 net::CACHE_BACKEND_DEFAULT, 152 net::CACHE_BACKEND_DEFAULT,
153 cache_path, 0, cache_task_runner_)); 153 cache_path, 0, cache_task_runner_));
154 154
155 storage_->set_http_network_session( 155 storage_->set_http_network_session(
156 base::MakeUnique<net::HttpNetworkSession>(network_session_params)); 156 base::MakeUnique<net::HttpNetworkSession>(network_session_params));
157 storage_->set_http_transaction_factory(base::MakeUnique<net::HttpCache>( 157 storage_->set_http_transaction_factory(base::MakeUnique<net::HttpCache>(
158 storage_->http_network_session(), std::move(main_backend), 158 storage_->http_network_session(), std::move(main_backend),
159 true /* set_up_quic_server_info */)); 159 true /* set_up_quic_server_info */));
160 160
161 std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory( 161 std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory(
162 new net::URLRequestJobFactoryImpl()); 162 net::URLRequestJobFactoryImpl::CreateWithHttpProtocolHandlers());
163 bool set_protocol = job_factory->SetProtocolHandler( 163 bool set_protocol = job_factory->SetProtocolHandler(
164 "data", base::WrapUnique(new net::DataProtocolHandler)); 164 "data", base::WrapUnique(new net::DataProtocolHandler));
165 DCHECK(set_protocol); 165 DCHECK(set_protocol);
166 166
167 storage_->set_job_factory(std::move(job_factory)); 167 storage_->set_job_factory(std::move(job_factory));
168 } 168 }
169 169
170 return url_request_context_.get(); 170 return url_request_context_.get();
171 } 171 }
172 172
173 scoped_refptr<base::SingleThreadTaskRunner> 173 scoped_refptr<base::SingleThreadTaskRunner>
174 ShellURLRequestContextGetter::GetNetworkTaskRunner() const { 174 ShellURLRequestContextGetter::GetNetworkTaskRunner() const {
175 return network_task_runner_; 175 return network_task_runner_;
176 } 176 }
177 177
178 } // namespace web 178 } // namespace web
OLDNEW
« no previous file with comments | « ios/crnet/crnet_environment.mm ('k') | net/cert_net/cert_net_fetcher_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698