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

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

Issue 6314010: Even more reordering the methods in headers and implementation in net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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/init_proxy_resolver.h ('k') | net/proxy/proxy_config.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/lock.h" 7 #include "base/lock.h"
8 #include "base/message_loop_proxy.h" 8 #include "base/message_loop_proxy.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 Lock lock_; 148 Lock lock_;
149 scoped_refptr<base::MessageLoopProxy> origin_loop_proxy_; 149 scoped_refptr<base::MessageLoopProxy> origin_loop_proxy_;
150 150
151 bool have_initialized_origin_loop_; 151 bool have_initialized_origin_loop_;
152 bool has_config_; 152 bool has_config_;
153 bool poll_task_outstanding_; 153 bool poll_task_outstanding_;
154 bool poll_task_queued_; 154 bool poll_task_queued_;
155 }; 155 };
156 156
157 PollingProxyConfigService::PollingProxyConfigService(
158 base::TimeDelta poll_interval,
159 GetConfigFunction get_config_func)
160 : core_(new Core(poll_interval, get_config_func)) {
161 }
162
163 PollingProxyConfigService::~PollingProxyConfigService() {
164 core_->Orphan();
165 }
166
167 void PollingProxyConfigService::AddObserver(Observer* observer) { 157 void PollingProxyConfigService::AddObserver(Observer* observer) {
168 core_->AddObserver(observer); 158 core_->AddObserver(observer);
169 } 159 }
170 160
171 void PollingProxyConfigService::RemoveObserver(Observer* observer) { 161 void PollingProxyConfigService::RemoveObserver(Observer* observer) {
172 core_->RemoveObserver(observer); 162 core_->RemoveObserver(observer);
173 } 163 }
174 164
175 bool PollingProxyConfigService::GetLatestProxyConfig(ProxyConfig* config) { 165 bool PollingProxyConfigService::GetLatestProxyConfig(ProxyConfig* config) {
176 return core_->GetLatestProxyConfig(config); 166 return core_->GetLatestProxyConfig(config);
177 } 167 }
178 168
179 void PollingProxyConfigService::OnLazyPoll() { 169 void PollingProxyConfigService::OnLazyPoll() {
180 core_->OnLazyPoll(); 170 core_->OnLazyPoll();
181 } 171 }
182 172
173 PollingProxyConfigService::PollingProxyConfigService(
174 base::TimeDelta poll_interval,
175 GetConfigFunction get_config_func)
176 : core_(new Core(poll_interval, get_config_func)) {
177 }
178
179 PollingProxyConfigService::~PollingProxyConfigService() {
180 core_->Orphan();
181 }
182
183 void PollingProxyConfigService::CheckForChangesNow() { 183 void PollingProxyConfigService::CheckForChangesNow() {
184 core_->CheckForChangesNow(); 184 core_->CheckForChangesNow();
185 } 185 }
186 186
187 } // namespace net 187 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/init_proxy_resolver.h ('k') | net/proxy/proxy_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698