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

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

Issue 10310179: Track sources of proxy settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update copyright Created 8 years, 6 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 | Annotate | Revision Log
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_mac.h" 5 #include "net/proxy/proxy_config_service_mac.h"
6 6
7 #include <CoreFoundation/CoreFoundation.h> 7 #include <CoreFoundation/CoreFoundation.h>
8 #include <SystemConfiguration/SystemConfiguration.h> 8 #include <SystemConfiguration/SystemConfiguration.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 } 148 }
149 149
150 // proxy bypass boolean 150 // proxy bypass boolean
151 151
152 if (GetBoolFromDictionary(config_dict.get(), 152 if (GetBoolFromDictionary(config_dict.get(),
153 kSCPropNetProxiesExcludeSimpleHostnames, 153 kSCPropNetProxiesExcludeSimpleHostnames,
154 false)) { 154 false)) {
155 config->proxy_rules().bypass_rules.AddRuleToBypassLocal(); 155 config->proxy_rules().bypass_rules.AddRuleToBypassLocal();
156 } 156 }
157
158 // Source
159 config->set_source(PROXY_CONFIG_SOURCE_SYSTEM);
157 } 160 }
158 161
159 } // namespace 162 } // namespace
160 163
161 // Reference-counted helper for posting a task to 164 // Reference-counted helper for posting a task to
162 // ProxyConfigServiceMac::OnProxyConfigChanged between the notifier and IO 165 // ProxyConfigServiceMac::OnProxyConfigChanged between the notifier and IO
163 // thread. This helper object may outlive the ProxyConfigServiceMac. 166 // thread. This helper object may outlive the ProxyConfigServiceMac.
164 class ProxyConfigServiceMac::Helper 167 class ProxyConfigServiceMac::Helper
165 : public base::RefCountedThreadSafe<ProxyConfigServiceMac::Helper> { 168 : public base::RefCountedThreadSafe<ProxyConfigServiceMac::Helper> {
166 public: 169 public:
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // Keep track of the last value we have seen. 266 // Keep track of the last value we have seen.
264 has_fetched_config_ = true; 267 has_fetched_config_ = true;
265 last_config_fetched_ = new_config; 268 last_config_fetched_ = new_config;
266 269
267 // Notify all the observers. 270 // Notify all the observers.
268 FOR_EACH_OBSERVER(Observer, observers_, 271 FOR_EACH_OBSERVER(Observer, observers_,
269 OnProxyConfigChanged(new_config, CONFIG_VALID)); 272 OnProxyConfigChanged(new_config, CONFIG_VALID));
270 } 273 }
271 274
272 } // namespace net 275 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698