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

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

Issue 10066045: RefCounted types should not have public destructors, net/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Deprecated cookiestore fix Created 8 years, 7 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
« no previous file with comments | « net/proxy/polling_proxy_config_service.cc ('k') | net/proxy/proxy_resolver_js_bindings.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 void Orphan() { 172 void Orphan() {
173 parent_ = NULL; 173 parent_ = NULL;
174 } 174 }
175 175
176 void OnProxyConfigChanged(const ProxyConfig& new_config) { 176 void OnProxyConfigChanged(const ProxyConfig& new_config) {
177 if (parent_) 177 if (parent_)
178 parent_->OnProxyConfigChanged(new_config); 178 parent_->OnProxyConfigChanged(new_config);
179 } 179 }
180 180
181 private: 181 private:
182 friend class base::RefCountedThreadSafe<Helper>;
183 ~Helper() {}
184
182 ProxyConfigServiceMac* parent_; 185 ProxyConfigServiceMac* parent_;
183 }; 186 };
184 187
185 ProxyConfigServiceMac::ProxyConfigServiceMac(MessageLoop* io_loop) 188 ProxyConfigServiceMac::ProxyConfigServiceMac(MessageLoop* io_loop)
186 : forwarder_(this), 189 : forwarder_(this),
187 has_fetched_config_(false), 190 has_fetched_config_(false),
188 helper_(new Helper(this)), 191 helper_(new Helper(this)),
189 io_loop_(io_loop) { 192 io_loop_(io_loop) {
190 DCHECK(io_loop); 193 DCHECK(io_loop);
191 config_watcher_.reset(new NetworkConfigWatcherMac(&forwarder_)); 194 config_watcher_.reset(new NetworkConfigWatcherMac(&forwarder_));
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 // Keep track of the last value we have seen. 262 // Keep track of the last value we have seen.
260 has_fetched_config_ = true; 263 has_fetched_config_ = true;
261 last_config_fetched_ = new_config; 264 last_config_fetched_ = new_config;
262 265
263 // Notify all the observers. 266 // Notify all the observers.
264 FOR_EACH_OBSERVER(Observer, observers_, 267 FOR_EACH_OBSERVER(Observer, observers_,
265 OnProxyConfigChanged(new_config, CONFIG_VALID)); 268 OnProxyConfigChanged(new_config, CONFIG_VALID));
266 } 269 }
267 270
268 } // namespace net 271 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/polling_proxy_config_service.cc ('k') | net/proxy/proxy_resolver_js_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698