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

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

Issue 540593002: Use scoped_refptr<SingleThreadTaskRunner> when initializing ProxyConfigService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/proxy/proxy_config_service_linux_unittest.cc ('k') | net/proxy/proxy_config_service_mac.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 #ifndef NET_PROXY_PROXY_CONFIG_SERVICE_MAC_H_ 5 #ifndef NET_PROXY_PROXY_CONFIG_SERVICE_MAC_H_
6 #define NET_PROXY_PROXY_CONFIG_SERVICE_MAC_H_ 6 #define NET_PROXY_PROXY_CONFIG_SERVICE_MAC_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 11 matching lines...) Expand all
22 22
23 // TODO(sergeyu): This class needs to be exported because remoting code 23 // TODO(sergeyu): This class needs to be exported because remoting code
24 // creates it directly. Fix that and remove NET_EXPORT here. 24 // creates it directly. Fix that and remove NET_EXPORT here.
25 // crbug.com/125104 25 // crbug.com/125104
26 class NET_EXPORT ProxyConfigServiceMac : public ProxyConfigService { 26 class NET_EXPORT ProxyConfigServiceMac : public ProxyConfigService {
27 public: 27 public:
28 // Constructs a ProxyConfigService that watches the Mac OS system settings. 28 // Constructs a ProxyConfigService that watches the Mac OS system settings.
29 // This instance is expected to be operated and deleted on the same thread 29 // This instance is expected to be operated and deleted on the same thread
30 // (however it may be constructed from a different thread). 30 // (however it may be constructed from a different thread).
31 explicit ProxyConfigServiceMac( 31 explicit ProxyConfigServiceMac(
32 base::SingleThreadTaskRunner* io_thread_task_runner); 32 const scoped_refptr<base::SingleThreadTaskRunner>& io_thread_task_runner);
33 virtual ~ProxyConfigServiceMac(); 33 virtual ~ProxyConfigServiceMac();
34 34
35 public: 35 public:
36 // ProxyConfigService implementation: 36 // ProxyConfigService implementation:
37 virtual void AddObserver(Observer* observer) OVERRIDE; 37 virtual void AddObserver(Observer* observer) OVERRIDE;
38 virtual void RemoveObserver(Observer* observer) OVERRIDE; 38 virtual void RemoveObserver(Observer* observer) OVERRIDE;
39 virtual ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) OVERRIDE; 39 virtual ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) OVERRIDE;
40 40
41 private: 41 private:
42 class Helper; 42 class Helper;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 // The thread that we expect to be operated on. 80 // The thread that we expect to be operated on.
81 const scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; 81 const scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_;
82 82
83 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceMac); 83 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceMac);
84 }; 84 };
85 85
86 } // namespace net 86 } // namespace net
87 87
88 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_MAC_H_ 88 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_MAC_H_
OLDNEW
« no previous file with comments | « net/proxy/proxy_config_service_linux_unittest.cc ('k') | net/proxy/proxy_config_service_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698