| 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 "net/proxy/proxy_config_service_win.h" | 5 #include "net/proxy/proxy_config_service_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <winhttp.h> | 8 #include <winhttp.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 ProxyConfigServiceWin::ProxyConfigServiceWin() | 42 ProxyConfigServiceWin::ProxyConfigServiceWin() |
| 43 : PollingProxyConfigService( | 43 : PollingProxyConfigService( |
| 44 base::TimeDelta::FromSeconds(kPollIntervalSec), | 44 base::TimeDelta::FromSeconds(kPollIntervalSec), |
| 45 &ProxyConfigServiceWin::GetCurrentProxyConfig) { | 45 &ProxyConfigServiceWin::GetCurrentProxyConfig) { |
| 46 } | 46 } |
| 47 | 47 |
| 48 ProxyConfigServiceWin::~ProxyConfigServiceWin() { | 48 ProxyConfigServiceWin::~ProxyConfigServiceWin() { |
| 49 // The registry functions below will end up going to disk. Do this on another | 49 // The registry functions below will end up going to disk. Do this on another |
| 50 // thread to avoid slowing the IO thread. http://crbug.com/61453 | 50 // thread to avoid slowing the IO thread. http://crbug.com/61453 |
| 51 base::ThreadRestrictions::ScopedAllowIO allow_io; | 51 base::ThreadRestrictions::ScopedAllowIO allow_io; |
| 52 STLDeleteElements(&keys_to_watch_); | 52 base::STLDeleteElements(&keys_to_watch_); |
| 53 } | 53 } |
| 54 | 54 |
| 55 void ProxyConfigServiceWin::AddObserver(Observer* observer) { | 55 void ProxyConfigServiceWin::AddObserver(Observer* observer) { |
| 56 // Lazily-initialize our registry watcher. | 56 // Lazily-initialize our registry watcher. |
| 57 StartWatchingRegistryForChanges(); | 57 StartWatchingRegistryForChanges(); |
| 58 | 58 |
| 59 // Let the super-class do its work now. | 59 // Let the super-class do its work now. |
| 60 PollingProxyConfigService::AddObserver(observer); | 60 PollingProxyConfigService::AddObserver(observer); |
| 61 } | 61 } |
| 62 | 62 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 std::string bypass_url_domain = proxy_server_bypass_list.token(); | 162 std::string bypass_url_domain = proxy_server_bypass_list.token(); |
| 163 config->proxy_rules().bypass_rules.AddRuleFromString(bypass_url_domain); | 163 config->proxy_rules().bypass_rules.AddRuleFromString(bypass_url_domain); |
| 164 } | 164 } |
| 165 } | 165 } |
| 166 if (ie_config.lpszAutoConfigUrl) | 166 if (ie_config.lpszAutoConfigUrl) |
| 167 config->set_pac_url(GURL(ie_config.lpszAutoConfigUrl)); | 167 config->set_pac_url(GURL(ie_config.lpszAutoConfigUrl)); |
| 168 config->set_source(PROXY_CONFIG_SOURCE_SYSTEM); | 168 config->set_source(PROXY_CONFIG_SOURCE_SYSTEM); |
| 169 } | 169 } |
| 170 | 170 |
| 171 } // namespace net | 171 } // namespace net |
| OLD | NEW |