OLD | NEW |
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 #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 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 | 273 |
274 // Thin wrapper shell around Delegate. | 274 // Thin wrapper shell around Delegate. |
275 | 275 |
276 // Usual constructor | 276 // Usual constructor |
277 ProxyConfigServiceLinux(); | 277 ProxyConfigServiceLinux(); |
278 // For testing: take alternate setting and env var getter implementations. | 278 // For testing: take alternate setting and env var getter implementations. |
279 explicit ProxyConfigServiceLinux(base::Environment* env_var_getter); | 279 explicit ProxyConfigServiceLinux(base::Environment* env_var_getter); |
280 ProxyConfigServiceLinux(base::Environment* env_var_getter, | 280 ProxyConfigServiceLinux(base::Environment* env_var_getter, |
281 SettingGetter* setting_getter); | 281 SettingGetter* setting_getter); |
282 | 282 |
283 virtual ~ProxyConfigServiceLinux(); | 283 ~ProxyConfigServiceLinux() override; |
284 | 284 |
285 void SetupAndFetchInitialConfig( | 285 void SetupAndFetchInitialConfig( |
286 const scoped_refptr<base::SingleThreadTaskRunner>& glib_task_runner, | 286 const scoped_refptr<base::SingleThreadTaskRunner>& glib_task_runner, |
287 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, | 287 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, |
288 const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner) { | 288 const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner) { |
289 delegate_->SetUpAndFetchInitialConfig(glib_task_runner, | 289 delegate_->SetUpAndFetchInitialConfig(glib_task_runner, |
290 io_task_runner, | 290 io_task_runner, |
291 file_task_runner); | 291 file_task_runner); |
292 } | 292 } |
293 void OnCheckProxyConfigSettings() { | 293 void OnCheckProxyConfigSettings() { |
294 delegate_->OnCheckProxyConfigSettings(); | 294 delegate_->OnCheckProxyConfigSettings(); |
295 } | 295 } |
296 | 296 |
297 // ProxyConfigService methods: | 297 // ProxyConfigService methods: |
298 // Called from IO thread. | 298 // Called from IO thread. |
299 virtual void AddObserver(Observer* observer) override; | 299 void AddObserver(Observer* observer) override; |
300 virtual void RemoveObserver(Observer* observer) override; | 300 void RemoveObserver(Observer* observer) override; |
301 virtual ProxyConfigService::ConfigAvailability GetLatestProxyConfig( | 301 ProxyConfigService::ConfigAvailability GetLatestProxyConfig( |
302 ProxyConfig* config) override; | 302 ProxyConfig* config) override; |
303 | 303 |
304 private: | 304 private: |
305 scoped_refptr<Delegate> delegate_; | 305 scoped_refptr<Delegate> delegate_; |
306 | 306 |
307 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceLinux); | 307 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceLinux); |
308 }; | 308 }; |
309 | 309 |
310 } // namespace net | 310 } // namespace net |
311 | 311 |
312 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ | 312 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_LINUX_H_ |
OLD | NEW |