Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Side by Side Diff: net/proxy/proxy_config_service_win.cc

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/proxy/proxy_config_service_android_unittest.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/proxy/proxy_config_service_android_unittest.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698