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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 return io_data_.GetExtensionsRequestContextGetter(); | 874 return io_data_.GetExtensionsRequestContextGetter(); |
875 } | 875 } |
876 | 876 |
877 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForStoragePartition( | 877 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForStoragePartition( |
878 const FilePath& partition_path, | 878 const FilePath& partition_path, |
879 bool in_memory) { | 879 bool in_memory) { |
880 return io_data_.GetIsolatedAppRequestContextGetter(partition_path, in_memory); | 880 return io_data_.GetIsolatedAppRequestContextGetter(partition_path, in_memory); |
881 } | 881 } |
882 | 882 |
883 net::SSLConfigService* ProfileImpl::GetSSLConfigService() { | 883 net::SSLConfigService* ProfileImpl::GetSSLConfigService() { |
| 884 // If ssl_config_service_manager_ is null, this typically means that some |
| 885 // ProfileKeyedService is trying to create a RequestContext at startup, but |
| 886 // SSLConfigServiceManager is not initialized until DoFinalInit() which is |
| 887 // invoked after all ProfileKeyedServices have been initialized (see |
| 888 // http://crbug.com/171406). |
| 889 DCHECK(ssl_config_service_manager_.get()) << |
| 890 "SSLConfigServiceManager is not initialized yet"; |
884 return ssl_config_service_manager_->Get(); | 891 return ssl_config_service_manager_->Get(); |
885 } | 892 } |
886 | 893 |
887 HostContentSettingsMap* ProfileImpl::GetHostContentSettingsMap() { | 894 HostContentSettingsMap* ProfileImpl::GetHostContentSettingsMap() { |
888 if (!host_content_settings_map_.get()) { | 895 if (!host_content_settings_map_.get()) { |
889 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false); | 896 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false); |
890 } | 897 } |
891 return host_content_settings_map_.get(); | 898 return host_content_settings_map_.get(); |
892 } | 899 } |
893 | 900 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1166 FilePath* cache_path, | 1173 FilePath* cache_path, |
1167 int* max_size) { | 1174 int* max_size) { |
1168 DCHECK(cache_path); | 1175 DCHECK(cache_path); |
1169 DCHECK(max_size); | 1176 DCHECK(max_size); |
1170 FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); | 1177 FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); |
1171 if (!path.empty()) | 1178 if (!path.empty()) |
1172 *cache_path = path; | 1179 *cache_path = path; |
1173 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1180 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
1174 prefs_->GetInteger(prefs::kDiskCacheSize); | 1181 prefs_->GetInteger(prefs::kDiskCacheSize); |
1175 } | 1182 } |
OLD | NEW |