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_DELEGATE_ANDROID_H_ | 5 #ifndef NET_ANDROID_NETWORK_CHANGE_NOTIFIER_DELEGATE_ANDROID_H_ |
6 #define NET_ANDROID_NETWORK_CHANGE_NOTIFIER_DELEGATE_ANDROID_H_ | 6 #define NET_ANDROID_NETWORK_CHANGE_NOTIFIER_DELEGATE_ANDROID_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/observer_list_threadsafe.h" | 13 #include "base/observer_list_threadsafe.h" |
14 #include "base/synchronization/lock.h" | 14 #include "base/synchronization/lock.h" |
15 #include "base/threading/thread_checker.h" | 15 #include "base/threading/thread_checker.h" |
| 16 #include "net/base/net_export.h" |
16 #include "net/base/network_change_notifier.h" | 17 #include "net/base/network_change_notifier.h" |
17 | 18 |
18 namespace net { | 19 namespace net { |
19 | 20 |
20 // Delegate used to thread-safely notify NetworkChangeNotifierAndroid whenever a | 21 // Delegate used to thread-safely notify NetworkChangeNotifierAndroid whenever a |
21 // network connection change notification is signaled by the Java side (on the | 22 // network connection change notification is signaled by the Java side (on the |
22 // JNI thread). | 23 // JNI thread). |
23 // All the methods exposed below must be called exclusively on the JNI thread | 24 // All the methods exposed below must be called exclusively on the JNI thread |
24 // unless otherwise stated (e.g. AddObserver()/RemoveObserver()). | 25 // unless otherwise stated (e.g. AddObserver()/RemoveObserver()). |
25 class NET_EXPORT_PRIVATE NetworkChangeNotifierDelegateAndroid { | 26 class NET_EXPORT_PRIVATE NetworkChangeNotifierDelegateAndroid { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 double connection_max_bandwidth_; | 151 double connection_max_bandwidth_; |
151 NetworkHandle default_network_; | 152 NetworkHandle default_network_; |
152 NetworkMap network_map_; | 153 NetworkMap network_map_; |
153 | 154 |
154 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierDelegateAndroid); | 155 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierDelegateAndroid); |
155 }; | 156 }; |
156 | 157 |
157 } // namespace net | 158 } // namespace net |
158 | 159 |
159 #endif // NET_ANDROID_NETWORK_CHANGE_NOTIFIER_DELEGATE_ANDROID_H_ | 160 #endif // NET_ANDROID_NETWORK_CHANGE_NOTIFIER_DELEGATE_ANDROID_H_ |
OLD | NEW |