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 "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 } | 109 } |
110 | 110 |
111 keys_to_watch_.push_back(key.release()); | 111 keys_to_watch_.push_back(key.release()); |
112 return true; | 112 return true; |
113 } | 113 } |
114 | 114 |
115 void ProxyConfigServiceWin::OnObjectSignaled(base::win::RegKey* key) { | 115 void ProxyConfigServiceWin::OnObjectSignaled(base::win::RegKey* key) { |
116 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed. | 116 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed. |
117 tracked_objects::ScopedTracker tracking_profile( | 117 tracked_objects::ScopedTracker tracking_profile( |
118 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 118 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
119 "ProxyConfigServiceWin_OnObjectSignaled")); | 119 "418183 ProxyConfigServiceWin::OnObjectSignaled")); |
120 | 120 |
121 // Figure out which registry key signalled this change. | 121 // Figure out which registry key signalled this change. |
122 RegKeyList::iterator it = | 122 RegKeyList::iterator it = |
123 std::find(keys_to_watch_.begin(), keys_to_watch_.end(), key); | 123 std::find(keys_to_watch_.begin(), keys_to_watch_.end(), key); |
124 DCHECK(it != keys_to_watch_.end()); | 124 DCHECK(it != keys_to_watch_.end()); |
125 | 125 |
126 // Keep watching the registry key. | 126 // Keep watching the registry key. |
127 if (!key->StartWatching(base::Bind(&ProxyConfigServiceWin::OnObjectSignaled, | 127 if (!key->StartWatching(base::Bind(&ProxyConfigServiceWin::OnObjectSignaled, |
128 base::Unretained(this), | 128 base::Unretained(this), |
129 base::Unretained(key)))) { | 129 base::Unretained(key)))) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 std::string bypass_url_domain = proxy_server_bypass_list.token(); | 169 std::string bypass_url_domain = proxy_server_bypass_list.token(); |
170 config->proxy_rules().bypass_rules.AddRuleFromString(bypass_url_domain); | 170 config->proxy_rules().bypass_rules.AddRuleFromString(bypass_url_domain); |
171 } | 171 } |
172 } | 172 } |
173 if (ie_config.lpszAutoConfigUrl) | 173 if (ie_config.lpszAutoConfigUrl) |
174 config->set_pac_url(GURL(ie_config.lpszAutoConfigUrl)); | 174 config->set_pac_url(GURL(ie_config.lpszAutoConfigUrl)); |
175 config->set_source(PROXY_CONFIG_SOURCE_SYSTEM); | 175 config->set_source(PROXY_CONFIG_SOURCE_SYSTEM); |
176 } | 176 } |
177 | 177 |
178 } // namespace net | 178 } // namespace net |
OLD | NEW |