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

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

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: Created 5 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
« no previous file with comments | « net/log/net_log.h ('k') | net/proxy/proxy_config_service_android.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/polling_proxy_config_service.h" 5 #include "net/proxy/polling_proxy_config_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // now chrome is constructing the ProxyConfigService on the 138 // now chrome is constructing the ProxyConfigService on the
139 // UI thread so we can't cache the IO thread for the purpose 139 // UI thread so we can't cache the IO thread for the purpose
140 // of DCHECKs until the first call is made. 140 // of DCHECKs until the first call is made.
141 if (!have_initialized_origin_runner_) { 141 if (!have_initialized_origin_runner_) {
142 origin_task_runner_ = base::ThreadTaskRunnerHandle::Get(); 142 origin_task_runner_ = base::ThreadTaskRunnerHandle::Get();
143 have_initialized_origin_runner_ = true; 143 have_initialized_origin_runner_ = true;
144 } 144 }
145 } 145 }
146 146
147 GetConfigFunction get_config_func_; 147 GetConfigFunction get_config_func_;
148 ObserverList<Observer> observers_; 148 base::ObserverList<Observer> observers_;
149 ProxyConfig last_config_; 149 ProxyConfig last_config_;
150 base::TimeTicks last_poll_time_; 150 base::TimeTicks last_poll_time_;
151 base::TimeDelta poll_interval_; 151 base::TimeDelta poll_interval_;
152 152
153 base::Lock lock_; 153 base::Lock lock_;
154 scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner_; 154 scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner_;
155 155
156 bool have_initialized_origin_runner_; 156 bool have_initialized_origin_runner_;
157 bool has_config_; 157 bool has_config_;
158 bool poll_task_outstanding_; 158 bool poll_task_outstanding_;
(...skipping 25 matching lines...) Expand all
184 184
185 PollingProxyConfigService::~PollingProxyConfigService() { 185 PollingProxyConfigService::~PollingProxyConfigService() {
186 core_->Orphan(); 186 core_->Orphan();
187 } 187 }
188 188
189 void PollingProxyConfigService::CheckForChangesNow() { 189 void PollingProxyConfigService::CheckForChangesNow() {
190 core_->CheckForChangesNow(); 190 core_->CheckForChangesNow();
191 } 191 }
192 192
193 } // namespace net 193 } // namespace net
OLDNEW
« no previous file with comments | « net/log/net_log.h ('k') | net/proxy/proxy_config_service_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698