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/profile_impl.h" | 5 #include "chrome/browser/profiles/profile_impl.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "chrome/browser/net/ssl_config_service_manager.h" | 45 #include "chrome/browser/net/ssl_config_service_manager.h" |
46 #include "chrome/browser/permissions/permission_manager.h" | 46 #include "chrome/browser/permissions/permission_manager.h" |
47 #include "chrome/browser/permissions/permission_manager_factory.h" | 47 #include "chrome/browser/permissions/permission_manager_factory.h" |
48 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" | 48 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" |
49 #include "chrome/browser/plugins/plugin_prefs.h" | 49 #include "chrome/browser/plugins/plugin_prefs.h" |
50 #include "chrome/browser/policy/profile_policy_connector.h" | 50 #include "chrome/browser/policy/profile_policy_connector.h" |
51 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 51 #include "chrome/browser/policy/profile_policy_connector_factory.h" |
52 #include "chrome/browser/prefs/browser_prefs.h" | 52 #include "chrome/browser/prefs/browser_prefs.h" |
53 #include "chrome/browser/prefs/chrome_pref_service_factory.h" | 53 #include "chrome/browser/prefs/chrome_pref_service_factory.h" |
54 #include "chrome/browser/prefs/pref_service_syncable.h" | 54 #include "chrome/browser/prefs/pref_service_syncable.h" |
| 55 #include "chrome/browser/prefs/pref_service_syncable_util.h" |
55 #include "chrome/browser/prerender/prerender_manager_factory.h" | 56 #include "chrome/browser/prerender/prerender_manager_factory.h" |
56 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h" | 57 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h" |
57 #include "chrome/browser/profiles/chrome_version_service.h" | 58 #include "chrome/browser/profiles/chrome_version_service.h" |
58 #include "chrome/browser/profiles/gaia_info_update_service_factory.h" | 59 #include "chrome/browser/profiles/gaia_info_update_service_factory.h" |
59 #include "chrome/browser/profiles/profile_destroyer.h" | 60 #include "chrome/browser/profiles/profile_destroyer.h" |
60 #include "chrome/browser/profiles/profile_info_cache.h" | 61 #include "chrome/browser/profiles/profile_info_cache.h" |
61 #include "chrome/browser/profiles/profile_manager.h" | 62 #include "chrome/browser/profiles/profile_manager.h" |
62 #include "chrome/browser/profiles/profile_metrics.h" | 63 #include "chrome/browser/profiles/profile_metrics.h" |
63 #include "chrome/browser/push_messaging/push_messaging_service_factory.h" | 64 #include "chrome/browser/push_messaging/push_messaging_service_factory.h" |
64 #include "chrome/browser/push_messaging/push_messaging_service_impl.h" | 65 #include "chrome/browser/push_messaging/push_messaging_service_impl.h" |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 ChromeZoomLevelPrefs* ProfileImpl::GetZoomLevelPrefs() { | 899 ChromeZoomLevelPrefs* ProfileImpl::GetZoomLevelPrefs() { |
899 return static_cast<ChromeZoomLevelPrefs*>( | 900 return static_cast<ChromeZoomLevelPrefs*>( |
900 GetDefaultStoragePartition(this)->GetZoomLevelDelegate()); | 901 GetDefaultStoragePartition(this)->GetZoomLevelDelegate()); |
901 } | 902 } |
902 | 903 |
903 PrefService* ProfileImpl::GetOffTheRecordPrefs() { | 904 PrefService* ProfileImpl::GetOffTheRecordPrefs() { |
904 DCHECK(prefs_); | 905 DCHECK(prefs_); |
905 if (!otr_prefs_) { | 906 if (!otr_prefs_) { |
906 // The new ExtensionPrefStore is ref_counted and the new PrefService | 907 // The new ExtensionPrefStore is ref_counted and the new PrefService |
907 // stores a reference so that we do not leak memory here. | 908 // stores a reference so that we do not leak memory here. |
908 otr_prefs_.reset(prefs_->CreateIncognitoPrefService( | 909 otr_prefs_.reset(CreateIncognitoPrefServiceSyncable( |
909 CreateExtensionPrefStore(this, true))); | 910 prefs_.get(), CreateExtensionPrefStore(this, true))); |
910 } | 911 } |
911 return otr_prefs_.get(); | 912 return otr_prefs_.get(); |
912 } | 913 } |
913 | 914 |
914 net::URLRequestContextGetter* ProfileImpl::CreateRequestContext( | 915 net::URLRequestContextGetter* ProfileImpl::CreateRequestContext( |
915 content::ProtocolHandlerMap* protocol_handlers, | 916 content::ProtocolHandlerMap* protocol_handlers, |
916 content::URLRequestInterceptorScopedVector request_interceptors) { | 917 content::URLRequestInterceptorScopedVector request_interceptors) { |
917 return io_data_.CreateMainRequestContextGetter( | 918 return io_data_.CreateMainRequestContextGetter( |
918 protocol_handlers, | 919 protocol_handlers, |
919 request_interceptors.Pass(), | 920 request_interceptors.Pass(), |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { | 1281 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { |
1281 domain_reliability::DomainReliabilityService* service = | 1282 domain_reliability::DomainReliabilityService* service = |
1282 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1283 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
1283 GetForBrowserContext(this); | 1284 GetForBrowserContext(this); |
1284 if (!service) | 1285 if (!service) |
1285 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1286 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); |
1286 | 1287 |
1287 return service->CreateMonitor( | 1288 return service->CreateMonitor( |
1288 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 1289 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
1289 } | 1290 } |
OLD | NEW |