| 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 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 // stores a reference so that we do not leak memory here. | 919 // stores a reference so that we do not leak memory here. |
| 920 otr_prefs_.reset(prefs_->CreateIncognitoPrefService( | 920 otr_prefs_.reset(prefs_->CreateIncognitoPrefService( |
| 921 new ExtensionPrefStore( | 921 new ExtensionPrefStore( |
| 922 ExtensionPrefValueMapFactory::GetForBrowserContext(this), true))); | 922 ExtensionPrefValueMapFactory::GetForBrowserContext(this), true))); |
| 923 } | 923 } |
| 924 return otr_prefs_.get(); | 924 return otr_prefs_.get(); |
| 925 } | 925 } |
| 926 | 926 |
| 927 net::URLRequestContextGetter* ProfileImpl::CreateRequestContext( | 927 net::URLRequestContextGetter* ProfileImpl::CreateRequestContext( |
| 928 content::ProtocolHandlerMap* protocol_handlers, | 928 content::ProtocolHandlerMap* protocol_handlers, |
| 929 content::ProtocolHandlerScopedVector protocol_interceptors) { | 929 content::URLRequestInterceptorScopedVector request_interceptors) { |
| 930 return io_data_.CreateMainRequestContextGetter( | 930 return io_data_.CreateMainRequestContextGetter( |
| 931 protocol_handlers, | 931 protocol_handlers, |
| 932 protocol_interceptors.Pass(), | 932 request_interceptors.Pass(), |
| 933 g_browser_process->local_state(), | 933 g_browser_process->local_state(), |
| 934 g_browser_process->io_thread()).get(); | 934 g_browser_process->io_thread()).get(); |
| 935 } | 935 } |
| 936 | 936 |
| 937 net::URLRequestContextGetter* ProfileImpl::GetRequestContext() { | 937 net::URLRequestContextGetter* ProfileImpl::GetRequestContext() { |
| 938 return GetDefaultStoragePartition(this)->GetURLRequestContext(); | 938 return GetDefaultStoragePartition(this)->GetURLRequestContext(); |
| 939 } | 939 } |
| 940 | 940 |
| 941 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess( | 941 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess( |
| 942 int renderer_child_id) { | 942 int renderer_child_id) { |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1036 | 1036 |
| 1037 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() { | 1037 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() { |
| 1038 return io_data_.GetExtensionsRequestContextGetter().get(); | 1038 return io_data_.GetExtensionsRequestContextGetter().get(); |
| 1039 } | 1039 } |
| 1040 | 1040 |
| 1041 net::URLRequestContextGetter* | 1041 net::URLRequestContextGetter* |
| 1042 ProfileImpl::CreateRequestContextForStoragePartition( | 1042 ProfileImpl::CreateRequestContextForStoragePartition( |
| 1043 const base::FilePath& partition_path, | 1043 const base::FilePath& partition_path, |
| 1044 bool in_memory, | 1044 bool in_memory, |
| 1045 content::ProtocolHandlerMap* protocol_handlers, | 1045 content::ProtocolHandlerMap* protocol_handlers, |
| 1046 content::ProtocolHandlerScopedVector protocol_interceptors) { | 1046 content::URLRequestInterceptorScopedVector request_interceptors) { |
| 1047 return io_data_.CreateIsolatedAppRequestContextGetter( | 1047 return io_data_.CreateIsolatedAppRequestContextGetter( |
| 1048 partition_path, | 1048 partition_path, |
| 1049 in_memory, | 1049 in_memory, |
| 1050 protocol_handlers, | 1050 protocol_handlers, |
| 1051 protocol_interceptors.Pass()).get(); | 1051 request_interceptors.Pass()).get(); |
| 1052 } | 1052 } |
| 1053 | 1053 |
| 1054 net::SSLConfigService* ProfileImpl::GetSSLConfigService() { | 1054 net::SSLConfigService* ProfileImpl::GetSSLConfigService() { |
| 1055 // If ssl_config_service_manager_ is null, this typically means that some | 1055 // If ssl_config_service_manager_ is null, this typically means that some |
| 1056 // KeyedService is trying to create a RequestContext at startup, | 1056 // KeyedService is trying to create a RequestContext at startup, |
| 1057 // but SSLConfigServiceManager is not initialized until DoFinalInit() which is | 1057 // but SSLConfigServiceManager is not initialized until DoFinalInit() which is |
| 1058 // invoked after all KeyedServices have been initialized (see | 1058 // invoked after all KeyedServices have been initialized (see |
| 1059 // http://crbug.com/171406). | 1059 // http://crbug.com/171406). |
| 1060 DCHECK(ssl_config_service_manager_) << | 1060 DCHECK(ssl_config_service_manager_) << |
| 1061 "SSLConfigServiceManager is not initialized yet"; | 1061 "SSLConfigServiceManager is not initialized yet"; |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1360 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { | 1360 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { |
| 1361 #if defined(OS_CHROMEOS) | 1361 #if defined(OS_CHROMEOS) |
| 1362 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 1362 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
| 1363 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 1363 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 1364 g_browser_process->local_state()); | 1364 g_browser_process->local_state()); |
| 1365 } | 1365 } |
| 1366 #endif // defined(OS_CHROMEOS) | 1366 #endif // defined(OS_CHROMEOS) |
| 1367 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 1367 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
| 1368 GetPrefs(), g_browser_process->local_state()); | 1368 GetPrefs(), g_browser_process->local_state()); |
| 1369 } | 1369 } |
| OLD | NEW |