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 <ostream> | 7 #include <ostream> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/json/json_string_value_serializer.h" | 10 #include "base/json/json_string_value_serializer.h" |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 } | 587 } |
588 | 588 |
589 // static | 589 // static |
590 void ProxyConfigServiceImpl::RegisterPrefs(PrefRegistrySimple* registry) { | 590 void ProxyConfigServiceImpl::RegisterPrefs(PrefRegistrySimple* registry) { |
591 // Use shared proxies default to off. GetUseSharedProxies will return the | 591 // Use shared proxies default to off. GetUseSharedProxies will return the |
592 // correct value based on pre-login and login. | 592 // correct value based on pre-login and login. |
593 registry->RegisterBooleanPref(prefs::kUseSharedProxies, true); | 593 registry->RegisterBooleanPref(prefs::kUseSharedProxies, true); |
594 } | 594 } |
595 | 595 |
596 // static | 596 // static |
597 void ProxyConfigServiceImpl::RegisterUserPrefs(PrefRegistrySyncable* registry) { | 597 void ProxyConfigServiceImpl::RegisterUserPrefs( |
598 registry->RegisterBooleanPref(prefs::kUseSharedProxies, | 598 user_prefs::PrefRegistrySyncable* registry) { |
599 true, | 599 registry->RegisterBooleanPref( |
600 PrefRegistrySyncable::UNSYNCABLE_PREF); | 600 prefs::kUseSharedProxies, |
| 601 true, |
| 602 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
601 } | 603 } |
602 | 604 |
603 //------------------ ProxyConfigServiceImpl: private methods ------------------- | 605 //------------------ ProxyConfigServiceImpl: private methods ------------------- |
604 | 606 |
605 void ProxyConfigServiceImpl::OnUseSharedProxiesChanged() { | 607 void ProxyConfigServiceImpl::OnUseSharedProxiesChanged() { |
606 VLOG(1) << "New use-shared-proxies = " << GetUseSharedProxies(); | 608 VLOG(1) << "New use-shared-proxies = " << GetUseSharedProxies(); |
607 | 609 |
608 // Determine new proxy config which may have changed because of new | 610 // Determine new proxy config which may have changed because of new |
609 // use-shared-proxies. If necessary, activate it. | 611 // use-shared-proxies. If necessary, activate it. |
610 Network* network = NULL; | 612 Network* network = NULL; |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 device_config_.clear(); | 875 device_config_.clear(); |
874 return; | 876 return; |
875 } | 877 } |
876 if (!active_network_.empty()) { | 878 if (!active_network_.empty()) { |
877 VLOG(1) << "Try migrating device config to " << active_network_; | 879 VLOG(1) << "Try migrating device config to " << active_network_; |
878 SetProxyConfigForNetwork(active_network_, device_config_, true); | 880 SetProxyConfigForNetwork(active_network_, device_config_, true); |
879 } | 881 } |
880 } | 882 } |
881 | 883 |
882 } // namespace chromeos | 884 } // namespace chromeos |
OLD | NEW |