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

Unified Diff: net/android/network_change_notifier_delegate_android.h

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
Index: net/android/network_change_notifier_delegate_android.h
diff --git a/net/android/network_change_notifier_delegate_android.h b/net/android/network_change_notifier_delegate_android.h
index f93c30b0b25c62706da744e2737f16d997d2cee1..f56188894f489ef483ed1fea54023113fca4fc52 100644
--- a/net/android/network_change_notifier_delegate_android.h
+++ b/net/android/network_change_notifier_delegate_android.h
@@ -55,6 +55,9 @@ class NET_EXPORT_PRIVATE NetworkChangeNotifierDelegateAndroid {
// Can be called from any thread.
ConnectionType GetCurrentConnectionType() const;
+ // Can be called from any thread.
+ double GetCurrentMaxBandwidth() const;
+
// Initializes JNI bindings.
static bool Register(JNIEnv* env);
@@ -62,6 +65,7 @@ class NET_EXPORT_PRIVATE NetworkChangeNotifierDelegateAndroid {
friend class BaseNetworkChangeNotifierAndroidTest;
void SetCurrentConnectionType(ConnectionType connection_type);
+ void SetCurrentMaxBandwidth(double max_bandwidth);
// Methods calling the Java side exposed for testing.
void SetOnline();
@@ -71,8 +75,9 @@ class NET_EXPORT_PRIVATE NetworkChangeNotifierDelegateAndroid {
scoped_refptr<ObserverListThreadSafe<Observer> > observers_;
scoped_refptr<base::SingleThreadTaskRunner> jni_task_runner_;
base::android::ScopedJavaGlobalRef<jobject> java_network_change_notifier_;
- mutable base::Lock connection_type_lock_; // Protects the state below.
+ mutable base::Lock connection_lock_; // Protects the state below.
ConnectionType connection_type_;
+ double connection_max_bandwidth_;
DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierDelegateAndroid);
};
« no previous file with comments | « net/android/network_change_notifier_android_unittest.cc ('k') | net/android/network_change_notifier_delegate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698