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_ANDROID_NETWORK_CHANGE_NOTIFIER_ANDROID_H_ | 5 #ifndef NET_ANDROID_NETWORK_CHANGE_NOTIFIER_ANDROID_H_ |
6 #define NET_ANDROID_NETWORK_CHANGE_NOTIFIER_ANDROID_H_ | 6 #define NET_ANDROID_NETWORK_CHANGE_NOTIFIER_ANDROID_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
9 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
10 #include "base/macros.h" | 12 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "net/android/network_change_notifier_delegate_android.h" | 13 #include "net/android/network_change_notifier_delegate_android.h" |
13 #include "net/base/network_change_notifier.h" | 14 #include "net/base/network_change_notifier.h" |
14 | 15 |
15 namespace net { | 16 namespace net { |
16 | 17 |
17 struct DnsConfig; | 18 struct DnsConfig; |
18 class NetworkChangeNotifierAndroidTest; | 19 class NetworkChangeNotifierAndroidTest; |
19 class NetworkChangeNotifierFactoryAndroid; | 20 class NetworkChangeNotifierFactoryAndroid; |
20 | 21 |
21 // NetworkChangeNotifierAndroid observes network events from the Android | 22 // NetworkChangeNotifierAndroid observes network events from the Android |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 86 |
86 // Enable NetworkHandles support for tests. | 87 // Enable NetworkHandles support for tests. |
87 void ForceNetworkHandlesSupportedForTesting(); | 88 void ForceNetworkHandlesSupportedForTesting(); |
88 | 89 |
89 NetworkChangeNotifierAndroid(NetworkChangeNotifierDelegateAndroid* delegate, | 90 NetworkChangeNotifierAndroid(NetworkChangeNotifierDelegateAndroid* delegate, |
90 const DnsConfig* dns_config_for_testing); | 91 const DnsConfig* dns_config_for_testing); |
91 | 92 |
92 static NetworkChangeCalculatorParams NetworkChangeCalculatorParamsAndroid(); | 93 static NetworkChangeCalculatorParams NetworkChangeCalculatorParamsAndroid(); |
93 | 94 |
94 NetworkChangeNotifierDelegateAndroid* const delegate_; | 95 NetworkChangeNotifierDelegateAndroid* const delegate_; |
95 scoped_ptr<DnsConfigServiceThread> dns_config_service_thread_; | 96 std::unique_ptr<DnsConfigServiceThread> dns_config_service_thread_; |
96 bool force_network_handles_supported_for_testing_; | 97 bool force_network_handles_supported_for_testing_; |
97 | 98 |
98 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierAndroid); | 99 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierAndroid); |
99 }; | 100 }; |
100 | 101 |
101 } // namespace net | 102 } // namespace net |
102 | 103 |
103 #endif // NET_ANDROID_NETWORK_CHANGE_NOTIFIER_ANDROID_H_ | 104 #endif // NET_ANDROID_NETWORK_CHANGE_NOTIFIER_ANDROID_H_ |
OLD | NEW |