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

Side by Side Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 664263002: Restructure SDCH layering to allow more separation (observer/1->[0,n] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync'd to 303035. Created 6 years, 1 month 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 | « chrome/browser/profiles/profile_impl_io_data.h ('k') | chrome/chrome_browser.gypi » ('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 (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/profile_impl_io_data.h" 5 #include "chrome/browser/profiles/profile_impl_io_data.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
11 #include "base/prefs/pref_member.h" 11 #include "base/prefs/pref_member.h"
12 #include "base/prefs/pref_service.h" 12 #include "base/prefs/pref_service.h"
13 #include "base/sequenced_task_runner.h" 13 #include "base/sequenced_task_runner.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.h"
15 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
16 #include "base/threading/sequenced_worker_pool.h" 16 #include "base/threading/sequenced_worker_pool.h"
17 #include "base/threading/worker_pool.h" 17 #include "base/threading/worker_pool.h"
18 #include "chrome/browser/chrome_notification_types.h" 18 #include "chrome/browser/chrome_notification_types.h"
19 #include "chrome/browser/chromeos/profiles/profile_helper.h" 19 #include "chrome/browser/chromeos/profiles/profile_helper.h"
20 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 20 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
21 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" 21 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
22 #include "chrome/browser/io_thread.h" 22 #include "chrome/browser/io_thread.h"
23 #include "chrome/browser/net/chrome_net_log.h" 23 #include "chrome/browser/net/chrome_net_log.h"
24 #include "chrome/browser/net/chrome_network_delegate.h" 24 #include "chrome/browser/net/chrome_network_delegate.h"
25 #include "chrome/browser/net/chrome_sdch_policy.h"
25 #include "chrome/browser/net/connect_interceptor.h" 26 #include "chrome/browser/net/connect_interceptor.h"
26 #include "chrome/browser/net/cookie_store_util.h" 27 #include "chrome/browser/net/cookie_store_util.h"
27 #include "chrome/browser/net/http_server_properties_manager_factory.h" 28 #include "chrome/browser/net/http_server_properties_manager_factory.h"
28 #include "chrome/browser/net/predictor.h" 29 #include "chrome/browser/net/predictor.h"
29 #include "chrome/browser/net/quota_policy_channel_id_store.h" 30 #include "chrome/browser/net/quota_policy_channel_id_store.h"
30 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator. h" 31 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator. h"
31 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 32 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
32 #include "chrome/browser/profiles/profile.h" 33 #include "chrome/browser/profiles/profile.h"
33 #include "chrome/common/chrome_constants.h" 34 #include "chrome/common/chrome_constants.h"
34 #include "chrome/common/chrome_switches.h" 35 #include "chrome/common/chrome_switches.h"
35 #include "chrome/common/pref_names.h" 36 #include "chrome/common/pref_names.h"
36 #include "chrome/common/url_constants.h" 37 #include "chrome/common/url_constants.h"
37 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_auth _request_handler.h" 38 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_auth _request_handler.h"
38 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prot ocol.h" 39 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prot ocol.h"
39 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_stat istics_prefs.h" 40 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_stat istics_prefs.h"
40 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_usag e_stats.h" 41 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_usag e_stats.h"
41 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_ names.h" 42 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_ names.h"
42 #include "components/domain_reliability/monitor.h" 43 #include "components/domain_reliability/monitor.h"
43 #include "content/public/browser/browser_thread.h" 44 #include "content/public/browser/browser_thread.h"
44 #include "content/public/browser/cookie_store_factory.h" 45 #include "content/public/browser/cookie_store_factory.h"
45 #include "content/public/browser/notification_service.h" 46 #include "content/public/browser/notification_service.h"
46 #include "content/public/browser/resource_context.h" 47 #include "content/public/browser/resource_context.h"
47 #include "content/public/browser/storage_partition.h" 48 #include "content/public/browser/storage_partition.h"
48 #include "extensions/browser/extension_protocols.h" 49 #include "extensions/browser/extension_protocols.h"
49 #include "extensions/common/constants.h" 50 #include "extensions/common/constants.h"
50 #include "net/base/cache_type.h" 51 #include "net/base/cache_type.h"
51 #include "net/base/sdch_dictionary_fetcher.h"
52 #include "net/base/sdch_manager.h" 52 #include "net/base/sdch_manager.h"
53 #include "net/ftp/ftp_network_layer.h" 53 #include "net/ftp/ftp_network_layer.h"
54 #include "net/http/http_cache.h" 54 #include "net/http/http_cache.h"
55 #include "net/http/http_server_properties_manager.h" 55 #include "net/http/http_server_properties_manager.h"
56 #include "net/ssl/channel_id_service.h" 56 #include "net/ssl/channel_id_service.h"
57 #include "net/url_request/url_request_job_factory_impl.h" 57 #include "net/url_request/url_request_job_factory_impl.h"
58 #include "storage/browser/quota/special_storage_policy.h" 58 #include "storage/browser/quota/special_storage_policy.h"
59 59
60 namespace { 60 namespace {
61 61
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 request_interceptors.Pass(), 572 request_interceptors.Pass(),
573 profile_params->protocol_handler_interceptor.Pass(), 573 profile_params->protocol_handler_interceptor.Pass(),
574 network_delegate(), 574 network_delegate(),
575 ftp_factory_.get()); 575 ftp_factory_.get());
576 main_context->set_job_factory(main_job_factory_.get()); 576 main_context->set_job_factory(main_job_factory_.get());
577 577
578 #if defined(ENABLE_EXTENSIONS) 578 #if defined(ENABLE_EXTENSIONS)
579 InitializeExtensionsRequestContext(profile_params); 579 InitializeExtensionsRequestContext(profile_params);
580 #endif 580 #endif
581 581
582 // Setup the SDCHManager for this profile. 582 // Setup SDCH for this profile.
583 sdch_manager_.reset(new net::SdchManager); 583 sdch_manager_.reset(new net::SdchManager);
584 sdch_manager_->set_sdch_fetcher(scoped_ptr<net::SdchFetcher>( 584 sdch_policy_.reset(new ChromeSdchPolicy(sdch_manager_.get(), main_context));
585 new net::SdchDictionaryFetcher(sdch_manager_.get(),
586 main_context)).Pass());
587 main_context->set_sdch_manager(sdch_manager_.get()); 585 main_context->set_sdch_manager(sdch_manager_.get());
588 586
589 // Create a media request context based on the main context, but using a 587 // Create a media request context based on the main context, but using a
590 // media cache. It shares the same job factory as the main context. 588 // media cache. It shares the same job factory as the main context.
591 StoragePartitionDescriptor details(profile_path_, false); 589 StoragePartitionDescriptor details(profile_path_, false);
592 media_request_context_.reset(InitializeMediaRequestContext(main_context, 590 media_request_context_.reset(InitializeMediaRequestContext(main_context,
593 details)); 591 details));
594 592
595 if (domain_reliability_monitor_) { 593 if (domain_reliability_monitor_) {
596 domain_reliability::DomainReliabilityMonitor* monitor = 594 domain_reliability::DomainReliabilityMonitor* monitor =
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 transport_security_state()->DeleteAllDynamicDataSince(time); 828 transport_security_state()->DeleteAllDynamicDataSince(time);
831 DCHECK(http_server_properties_manager_); 829 DCHECK(http_server_properties_manager_);
832 http_server_properties_manager_->Clear(completion); 830 http_server_properties_manager_->Clear(completion);
833 } 831 }
834 832
835 bool ProfileImplIOData::IsDataReductionProxyEnabled() const { 833 bool ProfileImplIOData::IsDataReductionProxyEnabled() const {
836 return data_reduction_proxy_enabled_.GetValue() || 834 return data_reduction_proxy_enabled_.GetValue() ||
837 CommandLine::ForCurrentProcess()->HasSwitch( 835 CommandLine::ForCurrentProcess()->HasSwitch(
838 data_reduction_proxy::switches::kEnableDataReductionProxy); 836 data_reduction_proxy::switches::kEnableDataReductionProxy);
839 } 837 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698