OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/profiles/off_the_record_profile_io_data.h" | 5 #include "chrome/browser/profiles/off_the_record_profile_io_data.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "chrome/common/chrome_switches.h" | 23 #include "chrome/common/chrome_switches.h" |
24 #include "chrome/common/pref_names.h" | 24 #include "chrome/common/pref_names.h" |
25 #include "chrome/common/url_constants.h" | 25 #include "chrome/common/url_constants.h" |
26 #include "components/net_log/chrome_net_log.h" | 26 #include "components/net_log/chrome_net_log.h" |
27 #include "components/prefs/pref_service.h" | 27 #include "components/prefs/pref_service.h" |
28 #include "content/public/browser/browser_thread.h" | 28 #include "content/public/browser/browser_thread.h" |
29 #include "content/public/browser/cookie_store_factory.h" | 29 #include "content/public/browser/cookie_store_factory.h" |
30 #include "content/public/browser/resource_context.h" | 30 #include "content/public/browser/resource_context.h" |
31 #include "extensions/common/constants.h" | 31 #include "extensions/common/constants.h" |
32 #include "extensions/features/features.h" | 32 #include "extensions/features/features.h" |
33 #include "net/base/sdch_manager.h" | |
34 #include "net/http/http_cache.h" | 33 #include "net/http/http_cache.h" |
35 #include "net/http/http_network_session.h" | 34 #include "net/http/http_network_session.h" |
36 #include "net/http/http_server_properties_impl.h" | 35 #include "net/http/http_server_properties_impl.h" |
37 #include "net/sdch/sdch_owner.h" | |
38 #include "net/ssl/channel_id_service.h" | 36 #include "net/ssl/channel_id_service.h" |
39 #include "net/ssl/default_channel_id_store.h" | 37 #include "net/ssl/default_channel_id_store.h" |
40 #include "net/url_request/url_request_context_storage.h" | 38 #include "net/url_request/url_request_context_storage.h" |
41 #include "net/url_request/url_request_job_factory_impl.h" | 39 #include "net/url_request/url_request_job_factory_impl.h" |
42 #include "storage/browser/database/database_tracker.h" | 40 #include "storage/browser/database/database_tracker.h" |
43 | 41 |
44 #if BUILDFLAG(ENABLE_EXTENSIONS) | 42 #if BUILDFLAG(ENABLE_EXTENSIONS) |
45 #include "extensions/common/extension.h" | 43 #include "extensions/common/extension.h" |
46 #endif | 44 #endif |
47 | 45 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 247 |
250 std::unique_ptr<net::URLRequestJobFactoryImpl> main_job_factory( | 248 std::unique_ptr<net::URLRequestJobFactoryImpl> main_job_factory( |
251 new net::URLRequestJobFactoryImpl()); | 249 new net::URLRequestJobFactoryImpl()); |
252 | 250 |
253 InstallProtocolHandlers(main_job_factory.get(), protocol_handlers); | 251 InstallProtocolHandlers(main_job_factory.get(), protocol_handlers); |
254 main_context_storage->set_job_factory(SetUpJobFactoryDefaults( | 252 main_context_storage->set_job_factory(SetUpJobFactoryDefaults( |
255 std::move(main_job_factory), std::move(request_interceptors), | 253 std::move(main_job_factory), std::move(request_interceptors), |
256 std::move(profile_params->protocol_handler_interceptor), | 254 std::move(profile_params->protocol_handler_interceptor), |
257 main_context->network_delegate(), main_context->host_resolver())); | 255 main_context->network_delegate(), main_context->host_resolver())); |
258 | 256 |
259 // Setup SDCH for this profile. | |
260 main_context_storage->set_sdch_manager(base::MakeUnique<net::SdchManager>()); | |
261 sdch_policy_.reset( | |
262 new net::SdchOwner(main_context->sdch_manager(), main_context)); | |
263 | |
264 #if BUILDFLAG(ENABLE_EXTENSIONS) | 257 #if BUILDFLAG(ENABLE_EXTENSIONS) |
265 InitializeExtensionsRequestContext(profile_params); | 258 InitializeExtensionsRequestContext(profile_params); |
266 #endif | 259 #endif |
267 } | 260 } |
268 | 261 |
269 void OffTheRecordProfileIOData:: | 262 void OffTheRecordProfileIOData:: |
270 InitializeExtensionsRequestContext(ProfileParams* profile_params) const { | 263 InitializeExtensionsRequestContext(ProfileParams* profile_params) const { |
271 net::URLRequestContext* extensions_context = extensions_request_context(); | 264 net::URLRequestContext* extensions_context = extensions_request_context(); |
272 | 265 |
273 IOThread* const io_thread = profile_params->io_thread; | 266 IOThread* const io_thread = profile_params->io_thread; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 return app_request_context; | 380 return app_request_context; |
388 } | 381 } |
389 | 382 |
390 net::URLRequestContext* | 383 net::URLRequestContext* |
391 OffTheRecordProfileIOData::AcquireIsolatedMediaRequestContext( | 384 OffTheRecordProfileIOData::AcquireIsolatedMediaRequestContext( |
392 net::URLRequestContext* app_context, | 385 net::URLRequestContext* app_context, |
393 const StoragePartitionDescriptor& partition_descriptor) const { | 386 const StoragePartitionDescriptor& partition_descriptor) const { |
394 NOTREACHED(); | 387 NOTREACHED(); |
395 return NULL; | 388 return NULL; |
396 } | 389 } |
OLD | NEW |