Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 NET_PROXY_PROXY_CONFIG_SERVICE_WIN_H_ | 5 #ifndef NET_PROXY_PROXY_CONFIG_SERVICE_WIN_H_ |
| 6 #define NET_PROXY_PROXY_CONFIG_SERVICE_WIN_H_ | 6 #define NET_PROXY_PROXY_CONFIG_SERVICE_WIN_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <winhttp.h> | 9 #include <winhttp.h> |
| 10 | 10 |
| 11 #include "net/proxy/proxy_config_service.h" | 11 #include "net/proxy/proxy_config_service.h" |
| 12 #include "testing/gtest/include/gtest/gtest_prod.h" | 12 #include "testing/gtest/include/gtest/gtest_prod.h" |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 | 15 |
| 16 // Implementation of ProxyConfigService that retrieves the system proxy | 16 // Implementation of ProxyConfigService that retrieves the system proxy |
| 17 // settings. | 17 // settings. |
| 18 class ProxyConfigServiceWin : public ProxyConfigService { | 18 class ProxyConfigServiceWin : public ProxyConfigService { |
| 19 public: | 19 public: |
| 20 // ProxyConfigService methods: | 20 // ProxyConfigService methods: |
| 21 virtual int GetProxyConfig(ProxyConfig* config); | 21 virtual int GetProxyConfig(ProxyConfig* config); |
| 22 | 22 |
| 23 private: | 23 private: |
| 24 FRIEND_TEST(ProxyConfigServiceWinTest, SetFromIEConfig); | 24 FRIEND_TEST(ProxyConfigServiceWinTest, SetFromIEConfig); |
| 25 FRIEND_TEST(ProxyConfigServiceWinTest, FallbackToSOCKSProxy); | |
|
eroman
2009/07/10 21:24:46
probably no need for this -- in my opinion, this
Arindam
2009/07/11 00:53:35
Done.
Arindam
2009/07/11 00:53:35
Done.
| |
| 25 | 26 |
| 26 // Set |config| using the proxy configuration values of |ie_config|. | 27 // Set |config| using the proxy configuration values of |ie_config|. |
| 27 static void SetFromIEConfig( | 28 static void SetFromIEConfig( |
| 28 ProxyConfig* config, | 29 ProxyConfig* config, |
| 29 const WINHTTP_CURRENT_USER_IE_PROXY_CONFIG& ie_config); | 30 const WINHTTP_CURRENT_USER_IE_PROXY_CONFIG& ie_config); |
| 30 }; | 31 }; |
| 31 | 32 |
| 32 } // namespace net | 33 } // namespace net |
| 33 | 34 |
| 34 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_WIN_H_ | 35 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_WIN_H_ |
| OLD | NEW |