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/chromeos/proxy_config_service_impl.h" | 5 #include "chrome/browser/chromeos/proxy_config_service_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/prefs/pref_registry_simple.h" | 10 #include "base/prefs/pref_registry_simple.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 } | 80 } |
81 | 81 |
82 // static | 82 // static |
83 void ProxyConfigServiceImpl::RegisterPrefs(PrefRegistrySimple* registry) { | 83 void ProxyConfigServiceImpl::RegisterPrefs(PrefRegistrySimple* registry) { |
84 // Use shared proxies default to off. GetUseSharedProxies will return the | 84 // Use shared proxies default to off. GetUseSharedProxies will return the |
85 // correct value based on pre-login and login. | 85 // correct value based on pre-login and login. |
86 registry->RegisterBooleanPref(prefs::kUseSharedProxies, true); | 86 registry->RegisterBooleanPref(prefs::kUseSharedProxies, true); |
87 } | 87 } |
88 | 88 |
89 // static | 89 // static |
90 void ProxyConfigServiceImpl::RegisterUserPrefs( | 90 void ProxyConfigServiceImpl::RegisterProfilePrefs( |
91 user_prefs::PrefRegistrySyncable* registry) { | 91 user_prefs::PrefRegistrySyncable* registry) { |
92 registry->RegisterBooleanPref( | 92 registry->RegisterBooleanPref( |
93 prefs::kUseSharedProxies, | 93 prefs::kUseSharedProxies, |
94 true, | 94 true, |
95 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 95 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
96 } | 96 } |
97 | 97 |
98 void ProxyConfigServiceImpl::OnUseSharedProxiesChanged() { | 98 void ProxyConfigServiceImpl::OnUseSharedProxiesChanged() { |
99 VLOG(1) << "New use-shared-proxies = " << GetUseSharedProxies(prefs()); | 99 VLOG(1) << "New use-shared-proxies = " << GetUseSharedProxies(prefs()); |
100 DetermineEffectiveConfigFromDefaultNetwork(); | 100 DetermineEffectiveConfigFromDefaultNetwork(); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 scoped_ptr<base::DictionaryValue> config_dict( | 233 scoped_ptr<base::DictionaryValue> config_dict( |
234 effective_config.ToValue()); | 234 effective_config.ToValue()); |
235 VLOG(1) << this << ": Proxy changed: " | 235 VLOG(1) << this << ": Proxy changed: " |
236 << ProxyPrefs::ConfigStateToDebugString(active_config_state_) | 236 << ProxyPrefs::ConfigStateToDebugString(active_config_state_) |
237 << ", " << *config_dict; | 237 << ", " << *config_dict; |
238 } | 238 } |
239 } | 239 } |
240 } | 240 } |
241 | 241 |
242 } // namespace chromeos | 242 } // namespace chromeos |
OLD | NEW |