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

Side by Side Diff: ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_io_data.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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/chrome/browser/browser_state/off_the_record_chrome_browser_state_i o_data.h" 5 #include "ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_i o_data.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 cookie_util::CookieStoreConfig::COOKIE_STORE_IOS, nullptr)); 199 cookie_util::CookieStoreConfig::COOKIE_STORE_IOS, nullptr));
200 main_context->set_cookie_store(main_cookie_store_.get()); 200 main_context->set_cookie_store(main_cookie_store_.get());
201 main_cookie_store_->SetChannelIDServiceID(channel_id_service->GetUniqueID()); 201 main_cookie_store_->SetChannelIDServiceID(channel_id_service->GetUniqueID());
202 202
203 http_network_session_ = CreateHttpNetworkSession(*profile_params); 203 http_network_session_ = CreateHttpNetworkSession(*profile_params);
204 main_http_factory_ = CreateMainHttpFactory( 204 main_http_factory_ = CreateMainHttpFactory(
205 http_network_session_.get(), net::HttpCache::DefaultBackend::InMemory(0)); 205 http_network_session_.get(), net::HttpCache::DefaultBackend::InMemory(0));
206 206
207 main_context->set_http_transaction_factory(main_http_factory_.get()); 207 main_context->set_http_transaction_factory(main_http_factory_.get());
208 208
209 std::unique_ptr<net::URLRequestJobFactoryImpl> main_job_factory( 209 std::unique_ptr<net::URLRequestJobFactoryImpl> main_job_factory =
210 new net::URLRequestJobFactoryImpl()); 210 net::URLRequestJobFactoryImpl::CreateWithHttpProtocolHandlers();
211 211
212 InstallProtocolHandlers(main_job_factory.get(), protocol_handlers); 212 InstallProtocolHandlers(main_job_factory.get(), protocol_handlers);
213 URLRequestInterceptorScopedVector empty_interceptors; 213 URLRequestInterceptorScopedVector empty_interceptors;
214 main_job_factory_ = SetUpJobFactoryDefaults(std::move(main_job_factory), 214 main_job_factory_ = SetUpJobFactoryDefaults(std::move(main_job_factory),
215 std::move(empty_interceptors), 215 std::move(empty_interceptors),
216 main_context->network_delegate()); 216 main_context->network_delegate());
217 main_context->set_job_factory(main_job_factory_.get()); 217 main_context->set_job_factory(main_job_factory_.get());
218 218
219 // Setup SDCH for this profile. 219 // Setup SDCH for this profile.
220 sdch_manager_.reset(new net::SdchManager); 220 sdch_manager_.reset(new net::SdchManager);
221 sdch_policy_.reset(new net::SdchOwner(sdch_manager_.get(), main_context)); 221 sdch_policy_.reset(new net::SdchOwner(sdch_manager_.get(), main_context));
222 main_context->set_sdch_manager(sdch_manager_.get()); 222 main_context->set_sdch_manager(sdch_manager_.get());
223 } 223 }
224 224
225 ChromeBrowserStateIOData::AppRequestContext* 225 ChromeBrowserStateIOData::AppRequestContext*
226 OffTheRecordChromeBrowserStateIOData::InitializeAppRequestContext( 226 OffTheRecordChromeBrowserStateIOData::InitializeAppRequestContext(
227 net::URLRequestContext* main_context) const { 227 net::URLRequestContext* main_context) const {
228 NOTREACHED(); 228 NOTREACHED();
229 return nullptr; 229 return nullptr;
230 } 230 }
231 231
232 ChromeBrowserStateIOData::AppRequestContext* 232 ChromeBrowserStateIOData::AppRequestContext*
233 OffTheRecordChromeBrowserStateIOData::AcquireIsolatedAppRequestContext( 233 OffTheRecordChromeBrowserStateIOData::AcquireIsolatedAppRequestContext(
234 net::URLRequestContext* main_context) const { 234 net::URLRequestContext* main_context) const {
235 NOTREACHED(); 235 NOTREACHED();
236 return nullptr; 236 return nullptr;
237 } 237 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.mm ('k') | ios/chrome/browser/ios_chrome_io_thread.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698