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

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

Issue 18112018: Cleanup the UseSharedProxies preference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a missing member initializer. Created 7 years, 5 months 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 | Annotate | Revision Log
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.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 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 new chromeos::EnterpriseExtensionObserver(this)); 1054 new chromeos::EnterpriseExtensionObserver(this));
1055 } 1055 }
1056 1056
1057 void ProfileImpl::InitChromeOSPreferences() { 1057 void ProfileImpl::InitChromeOSPreferences() {
1058 chromeos_preferences_.reset(new chromeos::Preferences()); 1058 chromeos_preferences_.reset(new chromeos::Preferences());
1059 chromeos_preferences_->Init(PrefServiceSyncable::FromProfile(this)); 1059 chromeos_preferences_->Init(PrefServiceSyncable::FromProfile(this));
1060 } 1060 }
1061 #endif // defined(OS_CHROMEOS) 1061 #endif // defined(OS_CHROMEOS)
1062 1062
1063 PrefProxyConfigTracker* ProfileImpl::GetProxyConfigTracker() { 1063 PrefProxyConfigTracker* ProfileImpl::GetProxyConfigTracker() {
1064 if (!pref_proxy_config_tracker_) { 1064 if (!pref_proxy_config_tracker_)
1065 pref_proxy_config_tracker_.reset( 1065 pref_proxy_config_tracker_.reset(CreateProxyConfigTracker());
1066 ProxyServiceFactory::CreatePrefProxyConfigTracker(GetPrefs()));
1067 }
1068 return pref_proxy_config_tracker_.get(); 1066 return pref_proxy_config_tracker_.get();
1069 } 1067 }
1070 1068
1071 chrome_browser_net::Predictor* ProfileImpl::GetNetworkPredictor() { 1069 chrome_browser_net::Predictor* ProfileImpl::GetNetworkPredictor() {
1072 return predictor_; 1070 return predictor_;
1073 } 1071 }
1074 1072
1075 void ProfileImpl::ClearNetworkingHistorySince(base::Time time, 1073 void ProfileImpl::ClearNetworkingHistorySince(base::Time time,
1076 const base::Closure& completion) { 1074 const base::Closure& completion) {
1077 io_data_.ClearNetworkingHistorySince(time, completion); 1075 io_data_.ClearNetworkingHistorySince(time, completion);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 base::FilePath* cache_path, 1144 base::FilePath* cache_path,
1147 int* max_size) { 1145 int* max_size) {
1148 DCHECK(cache_path); 1146 DCHECK(cache_path);
1149 DCHECK(max_size); 1147 DCHECK(max_size);
1150 base::FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); 1148 base::FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir));
1151 if (!path.empty()) 1149 if (!path.empty())
1152 *cache_path = path; 1150 *cache_path = path;
1153 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : 1151 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) :
1154 prefs_->GetInteger(prefs::kDiskCacheSize); 1152 prefs_->GetInteger(prefs::kDiskCacheSize);
1155 } 1153 }
1154
1155 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() {
1156 #if defined(OS_CHROMEOS)
1157 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
1158 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
1159 g_browser_process->local_state());
1160 }
1161 #endif // defined(OS_CHROMEOS)
1162 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
1163 GetPrefs(), g_browser_process->local_state());
1164 }
1165
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698