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(PrefServiceSimple* pref_service); | 202 static void RegisterPrefs(PrefRegistrySimple* pref_service); |
203 static void RegisterUserPrefs(PrefServiceSyncable* pref_service); | 203 static void RegisterUserPrefs(PrefServiceSyncable* pref_service); |
204 | 204 |
205 #if defined(UNIT_TEST) | 205 #if defined(UNIT_TEST) |
206 void SetTesting(ProxyConfig* test_config) { | 206 void SetTesting(ProxyConfig* test_config) { |
207 UIMakeActiveNetworkCurrent(); | 207 UIMakeActiveNetworkCurrent(); |
208 if (test_config) { | 208 if (test_config) { |
209 std::string value; | 209 std::string value; |
210 test_config->SerializeForNetwork(&value); | 210 test_config->SerializeForNetwork(&value); |
211 SetProxyConfigForNetwork(active_network_, value, false); | 211 SetProxyConfigForNetwork(active_network_, value, false); |
212 } | 212 } |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 std::vector<base::Closure> callbacks_; | 295 std::vector<base::Closure> callbacks_; |
296 | 296 |
297 base::WeakPtrFactory<ProxyConfigServiceImpl> pointer_factory_; | 297 base::WeakPtrFactory<ProxyConfigServiceImpl> pointer_factory_; |
298 | 298 |
299 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceImpl); | 299 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceImpl); |
300 }; | 300 }; |
301 | 301 |
302 } // namespace chromeos | 302 } // namespace chromeos |
303 | 303 |
304 #endif // CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_IMPL_H_ | 304 #endif // CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_IMPL_H_ |
OLD | NEW |