summaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2011-01-25 15:42:00 +0000
committerKristian Monsen <kristianm@google.com>2011-01-25 15:42:00 +0000
commite6720cd0c92969c2a3360cffef01724dbe1fc923 (patch)
tree0f5f2edff18b257ae704a061814368e2829b1c0d /android
parent7bd9f0bd9b6fabe8c8b7a30a570f0d635822ffbd (diff)
downloadexternal_chromium-e6720cd0c92969c2a3360cffef01724dbe1fc923.zip
external_chromium-e6720cd0c92969c2a3360cffef01724dbe1fc923.tar.gz
external_chromium-e6720cd0c92969c2a3360cffef01724dbe1fc923.tar.bz2
Fix for bug 3360824, warning when opening tab
Not creating a new android network library if another already exists Change-Id: I91547cca84b91b1cbdd14b701c468fcb5bcd852f
Diffstat (limited to 'android')
-rw-r--r--android/net/android_network_library_impl.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/android/net/android_network_library_impl.cc b/android/net/android_network_library_impl.cc
index 8e4aa0e..8f000f1 100644
--- a/android/net/android_network_library_impl.cc
+++ b/android/net/android_network_library_impl.cc
@@ -120,8 +120,9 @@ void AndroidNetworkLibraryImpl::InitWithApplicationContext(JNIEnv* env,
jobject context) {
// Currently ignoring |context| as it is not needed (but remains in signature
// for API consistency with the equivalent method on class AndroidOS).
- net::AndroidNetworkLibrary::RegisterSharedInstance(
- new AndroidNetworkLibraryImpl(env));
+ if (!net::AndroidNetworkLibrary::GetSharedInstance())
+ net::AndroidNetworkLibrary::RegisterSharedInstance(
+ new AndroidNetworkLibraryImpl(env));
}
AndroidNetworkLibraryImpl::AndroidNetworkLibraryImpl(JNIEnv* env)