| 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 #ifndef CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_IMPL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_IMPL_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_IMPL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // NetworkLibrary::NetworkObserver implementation. | 192 // NetworkLibrary::NetworkObserver implementation. |
| 193 virtual void OnNetworkChanged(NetworkLibrary* cros, | 193 virtual void OnNetworkChanged(NetworkLibrary* cros, |
| 194 const Network* network) OVERRIDE; | 194 const Network* network) OVERRIDE; |
| 195 | 195 |
| 196 // Parse |network| proxy config and store result in |proxy_config|. | 196 // Parse |network| proxy config and store result in |proxy_config|. |
| 197 // Returns true if proxy config was successfully parsed. | 197 // Returns true if proxy config was successfully parsed. |
| 198 static bool ParseProxyConfig(const Network* network, | 198 static bool ParseProxyConfig(const Network* network, |
| 199 net::ProxyConfig* proxy_config); | 199 net::ProxyConfig* proxy_config); |
| 200 | 200 |
| 201 // Register UseShardProxies preference. | 201 // Register UseShardProxies preference. |
| 202 static void RegisterPrefs(PrefService* pref_service); | 202 static void RegisterPrefs(PrefServiceSimple* pref_service); |
| 203 | 203 |
| 204 #if defined(UNIT_TEST) | 204 #if defined(UNIT_TEST) |
| 205 void SetTesting(ProxyConfig* test_config) { | 205 void SetTesting(ProxyConfig* test_config) { |
| 206 UIMakeActiveNetworkCurrent(); | 206 UIMakeActiveNetworkCurrent(); |
| 207 if (test_config) { | 207 if (test_config) { |
| 208 std::string value; | 208 std::string value; |
| 209 test_config->SerializeForNetwork(&value); | 209 test_config->SerializeForNetwork(&value); |
| 210 SetProxyConfigForNetwork(active_network_, value, false); | 210 SetProxyConfigForNetwork(active_network_, value, false); |
| 211 } | 211 } |
| 212 } | 212 } |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 std::vector<base::Closure> callbacks_; | 294 std::vector<base::Closure> callbacks_; |
| 295 | 295 |
| 296 base::WeakPtrFactory<ProxyConfigServiceImpl> pointer_factory_; | 296 base::WeakPtrFactory<ProxyConfigServiceImpl> pointer_factory_; |
| 297 | 297 |
| 298 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceImpl); | 298 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceImpl); |
| 299 }; | 299 }; |
| 300 | 300 |
| 301 } // namespace chromeos | 301 } // namespace chromeos |
| 302 | 302 |
| 303 #endif // CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_IMPL_H_ | 303 #endif // CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_IMPL_H_ |
| OLD | NEW |