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

Unified Diff: net/android/network_change_notifier_android.h

Issue 10928193: Add native-side unit test for Android NetworkChangeNotifier (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebasing Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/android/net_jni_registrar.cc ('k') | net/android/network_change_notifier_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/android/network_change_notifier_android.h
diff --git a/net/android/network_change_notifier_android.h b/net/android/network_change_notifier_android.h
index 3c71dc5995bb31fdfacf88b46fc8e37ce2cb8106..2824600964cc4fa7066e38f005f24a7e1e4d7565 100644
--- a/net/android/network_change_notifier_android.h
+++ b/net/android/network_change_notifier_android.h
@@ -11,30 +11,32 @@
#include "net/base/network_change_notifier.h"
namespace net {
-namespace android {
-class NetworkChangeNotifier : public net::NetworkChangeNotifier {
+class NetworkChangeNotifierAndroidTest;
+
+class NetworkChangeNotifierAndroid : public NetworkChangeNotifier {
public:
- NetworkChangeNotifier();
- virtual ~NetworkChangeNotifier();
+ NetworkChangeNotifierAndroid();
+ virtual ~NetworkChangeNotifierAndroid();
- void NotifyObservers(JNIEnv* env, jobject obj);
+ void NotifyObserversOfConnectionTypeChange(JNIEnv* env, jobject obj);
static bool Register(JNIEnv* env);
private:
- void CreateJavaObject(JNIEnv* env);
+ friend class NetworkChangeNotifierAndroidTest;
// NetworkChangeNotifier:
- virtual net::NetworkChangeNotifier::ConnectionType
+ virtual NetworkChangeNotifier::ConnectionType
GetCurrentConnectionType() const OVERRIDE;
+ void ForceConnectivityState(bool state);
+
base::android::ScopedJavaGlobalRef<jobject> java_network_change_notifier_;
- DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier);
+ DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierAndroid);
};
-} // namespace android
} // namespace net
#endif // NET_ANDROID_NETWORK_CHANGE_NOTIFIER_ANDROID_H_
« no previous file with comments | « net/android/net_jni_registrar.cc ('k') | net/android/network_change_notifier_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698