| 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 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1063 new chromeos::EnterpriseExtensionObserver(this)); | 1063 new chromeos::EnterpriseExtensionObserver(this)); |
| 1064 } | 1064 } |
| 1065 | 1065 |
| 1066 void ProfileImpl::InitChromeOSPreferences() { | 1066 void ProfileImpl::InitChromeOSPreferences() { |
| 1067 chromeos_preferences_.reset(new chromeos::Preferences()); | 1067 chromeos_preferences_.reset(new chromeos::Preferences()); |
| 1068 chromeos_preferences_->Init(PrefServiceSyncable::FromProfile(this)); | 1068 chromeos_preferences_->Init(PrefServiceSyncable::FromProfile(this)); |
| 1069 } | 1069 } |
| 1070 #endif // defined(OS_CHROMEOS) | 1070 #endif // defined(OS_CHROMEOS) |
| 1071 | 1071 |
| 1072 PrefProxyConfigTracker* ProfileImpl::GetProxyConfigTracker() { | 1072 PrefProxyConfigTracker* ProfileImpl::GetProxyConfigTracker() { |
| 1073 if (!pref_proxy_config_tracker_) { | 1073 if (!pref_proxy_config_tracker_) |
| 1074 pref_proxy_config_tracker_.reset( | 1074 pref_proxy_config_tracker_.reset(CreateProxyConfigTracker()); |
| 1075 ProxyServiceFactory::CreatePrefProxyConfigTracker(GetPrefs())); | |
| 1076 } | |
| 1077 return pref_proxy_config_tracker_.get(); | 1075 return pref_proxy_config_tracker_.get(); |
| 1078 } | 1076 } |
| 1079 | 1077 |
| 1080 chrome_browser_net::Predictor* ProfileImpl::GetNetworkPredictor() { | 1078 chrome_browser_net::Predictor* ProfileImpl::GetNetworkPredictor() { |
| 1081 return predictor_; | 1079 return predictor_; |
| 1082 } | 1080 } |
| 1083 | 1081 |
| 1084 void ProfileImpl::ClearNetworkingHistorySince(base::Time time, | 1082 void ProfileImpl::ClearNetworkingHistorySince(base::Time time, |
| 1085 const base::Closure& completion) { | 1083 const base::Closure& completion) { |
| 1086 io_data_.ClearNetworkingHistorySince(time, completion); | 1084 io_data_.ClearNetworkingHistorySince(time, completion); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1155 base::FilePath* cache_path, | 1153 base::FilePath* cache_path, |
| 1156 int* max_size) { | 1154 int* max_size) { |
| 1157 DCHECK(cache_path); | 1155 DCHECK(cache_path); |
| 1158 DCHECK(max_size); | 1156 DCHECK(max_size); |
| 1159 base::FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); | 1157 base::FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); |
| 1160 if (!path.empty()) | 1158 if (!path.empty()) |
| 1161 *cache_path = path; | 1159 *cache_path = path; |
| 1162 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1160 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
| 1163 prefs_->GetInteger(prefs::kDiskCacheSize); | 1161 prefs_->GetInteger(prefs::kDiskCacheSize); |
| 1164 } | 1162 } |
| 1163 |
| 1164 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { |
| 1165 #if defined(OS_CHROMEOS) |
| 1166 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
| 1167 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 1168 g_browser_process->local_state()); |
| 1169 } |
| 1170 #endif // defined(OS_CHROMEOS) |
| 1171 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
| 1172 GetPrefs(), g_browser_process->local_state()); |
| 1173 } |
| 1174 |
| OLD | NEW |