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_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 28 matching lines...) Expand all Loading... | |
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; |
43 | 43 |
44 // Forwarder just exists to keep the NetworkConfigWatcherMac API out of | 44 // Forwarder just exists to keep the NetworkConfigWatcherMac API out of |
45 // ProxyConfigServiceMac's public API. | 45 // ProxyConfigServiceMac's public API. |
46 class Forwarder : public NetworkConfigWatcherMac::Delegate { | 46 class Forwarder : public NetworkConfigWatcherMac::Delegate { |
47 public: | 47 public: |
48 explicit Forwarder(ProxyConfigServiceMac* proxy_config_service) | 48 explicit Forwarder(ProxyConfigServiceMac* proxy_config_service) |
49 : proxy_config_service_(proxy_config_service) {} | 49 : proxy_config_service_(proxy_config_service) {} |
mmenke
2012/08/09 15:13:35
Shouldn't you de-inline this as well? You did so
hans
2012/08/09 15:35:42
Those constructors were considered more complex by
| |
50 | 50 |
51 // NetworkConfigWatcherMac::Delegate implementation: | 51 // NetworkConfigWatcherMac::Delegate implementation: |
52 virtual void StartReachabilityNotifications() OVERRIDE {} | 52 virtual void StartReachabilityNotifications() OVERRIDE {} |
53 virtual void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store) | 53 virtual void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store) |
54 OVERRIDE { | 54 OVERRIDE; |
mmenke
2012/08/09 15:13:35
nit: OVERRIDE is generally not placed on its own
hans
2012/08/09 15:35:42
Done.
| |
55 proxy_config_service_->SetDynamicStoreNotificationKeys(store); | 55 virtual void OnNetworkConfigChange(CFArrayRef changed_keys) OVERRIDE; |
56 } | |
57 virtual void OnNetworkConfigChange(CFArrayRef changed_keys) OVERRIDE { | |
58 proxy_config_service_->OnNetworkConfigChange(changed_keys); | |
59 } | |
60 | 56 |
61 private: | 57 private: |
62 ProxyConfigServiceMac* const proxy_config_service_; | 58 ProxyConfigServiceMac* const proxy_config_service_; |
63 DISALLOW_COPY_AND_ASSIGN(Forwarder); | 59 DISALLOW_COPY_AND_ASSIGN(Forwarder); |
64 }; | 60 }; |
65 | 61 |
66 // Methods directly called by the NetworkConfigWatcherMac::Delegate: | 62 // Methods directly called by the NetworkConfigWatcherMac::Delegate: |
67 void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store); | 63 void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store); |
68 void OnNetworkConfigChange(CFArrayRef changed_keys); | 64 void OnNetworkConfigChange(CFArrayRef changed_keys); |
69 | 65 |
(...skipping 13 matching lines...) Expand all Loading... | |
83 | 79 |
84 // The thread that we expect to be operated on. | 80 // The thread that we expect to be operated on. |
85 const scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; | 81 const scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; |
86 | 82 |
87 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceMac); | 83 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceMac); |
88 }; | 84 }; |
89 | 85 |
90 } // namespace net | 86 } // namespace net |
91 | 87 |
92 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_MAC_H_ | 88 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_MAC_H_ |
OLD | NEW |