OLD | NEW |
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 #ifndef NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ | 5 #ifndef NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ |
6 #define NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ | 6 #define NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 MessageLoopForIO* file_loop) { | 230 MessageLoopForIO* file_loop) { |
231 delegate_->SetupAndFetchInitialConfig(glib_default_loop, io_loop, | 231 delegate_->SetupAndFetchInitialConfig(glib_default_loop, io_loop, |
232 file_loop); | 232 file_loop); |
233 } | 233 } |
234 void OnCheckProxyConfigSettings() { | 234 void OnCheckProxyConfigSettings() { |
235 delegate_->OnCheckProxyConfigSettings(); | 235 delegate_->OnCheckProxyConfigSettings(); |
236 } | 236 } |
237 | 237 |
238 // ProxyConfigService methods: | 238 // ProxyConfigService methods: |
239 // Called from IO thread. | 239 // Called from IO thread. |
240 | 240 virtual void AddObserver(Observer* observer); |
241 virtual void AddObserver(Observer* observer) { | 241 virtual void RemoveObserver(Observer* observer); |
242 delegate_->AddObserver(observer); | 242 virtual bool GetLatestProxyConfig(ProxyConfig* config); |
243 } | |
244 | |
245 virtual void RemoveObserver(Observer* observer) { | |
246 delegate_->RemoveObserver(observer); | |
247 } | |
248 | |
249 virtual bool GetLatestProxyConfig(ProxyConfig* config) { | |
250 return delegate_->GetLatestProxyConfig(config); | |
251 } | |
252 | 243 |
253 private: | 244 private: |
254 scoped_refptr<Delegate> delegate_; | 245 scoped_refptr<Delegate> delegate_; |
255 | 246 |
256 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceLinux); | 247 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceLinux); |
257 }; | 248 }; |
258 | 249 |
259 } // namespace net | 250 } // namespace net |
260 | 251 |
261 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ | 252 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ |
OLD | NEW |