Chromium Code Reviews| Index: net/android/network_change_notifier_android.cc |
| diff --git a/net/android/network_change_notifier_android.cc b/net/android/network_change_notifier_android.cc |
| index e1cea06c7698825d843aebd63c7279279f80dd32..b7109af35b93c80bd2f1ff5891e49144a948554d 100644 |
| --- a/net/android/network_change_notifier_android.cc |
| +++ b/net/android/network_change_notifier_android.cc |
| @@ -31,13 +31,17 @@ void NetworkChangeNotifier::CreateJavaObject(JNIEnv* env) { |
| } |
| void NetworkChangeNotifier::NotifyObservers(JNIEnv* env, jobject obj) { |
| - NotifyObserversOfOnlineStateChange(); |
| + NotifyObserversOfConnectionTypeChange(); |
| } |
| -bool NetworkChangeNotifier::IsCurrentlyOffline() const { |
| +net::NetworkChangeNotifier::ConnectionType |
| + NetworkChangeNotifier::GetCurrentConnectionType() const { |
| JNIEnv* env = base::android::AttachCurrentThread(); |
| - return !Java_NetworkChangeNotifier_isConnected( |
| - env, java_network_change_notifier_.obj()); |
| + // TODO: Return something more detailed than CONNECTION_UNKNOWN. |
|
wtc
2012/05/11 01:35:05
Nit: add 'droger' to TODO.
|
| + return Java_NetworkChangeNotifier_isConnected( |
| + env, java_network_change_notifier_.obj()) ? |
| + net::NetworkChangeNotifier::CONNECTION_UNKNOWN : |
| + net::NetworkChangeNotifier::CONNECTION_NONE; |
| } |
| // static |