diff options
-rw-r--r-- | WebKit/Android.mk | 2 | ||||
-rw-r--r-- | WebKit/android/WebCoreSupport/ChromiumInit.cpp (renamed from WebKit/android/WebCoreSupport/ChromiumLogging.cpp) | 15 | ||||
-rw-r--r-- | WebKit/android/WebCoreSupport/ChromiumInit.h (renamed from WebKit/android/WebCoreSupport/ChromiumLogging.h) | 2 | ||||
-rw-r--r-- | WebKit/android/WebCoreSupport/WebRequestContext.cpp | 4 | ||||
-rw-r--r-- | WebKit/android/jni/WebCoreFrameBridge.cpp | 6 |
5 files changed, 15 insertions, 14 deletions
diff --git a/WebKit/Android.mk b/WebKit/Android.mk index e039421..25e7be3 100644 --- a/WebKit/Android.mk +++ b/WebKit/Android.mk @@ -34,7 +34,7 @@ LOCAL_SRC_FILES := \ ifeq ($(HTTP_STACK),chrome) LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \ - android/WebCoreSupport/ChromiumLogging.cpp \ + android/WebCoreSupport/ChromiumInit.cpp \ android/WebCoreSupport/WebCache.cpp \ android/WebCoreSupport/WebCookieJar.cpp \ android/WebCoreSupport/WebUrlLoader.cpp \ diff --git a/WebKit/android/WebCoreSupport/ChromiumLogging.cpp b/WebKit/android/WebCoreSupport/ChromiumInit.cpp index cde2493..221704b 100644 --- a/WebKit/android/WebCoreSupport/ChromiumLogging.cpp +++ b/WebKit/android/WebCoreSupport/ChromiumInit.cpp @@ -24,7 +24,7 @@ */ #include "config.h" -#include "ChromiumLogging.h" +#include "ChromiumInit.h" #include "ChromiumIncludes.h" @@ -54,14 +54,15 @@ bool logMessageHandler(int severity, const char* file, int line, size_t message_ return false; } -void initChromiumLogging() +void initChromium() { - static Lock loggingLock; - AutoLock aLock(loggingLock); - static bool loggingStarted = false; - if (!loggingStarted) { + static Lock lock; + AutoLock aLock(lock); + static bool initCalled = false; + if (!initCalled) { logging::SetLogMessageHandler(logMessageHandler); - loggingStarted = true; + net::HttpNetworkLayer::EnableSpdy("npn"); + initCalled = true; } } diff --git a/WebKit/android/WebCoreSupport/ChromiumLogging.h b/WebKit/android/WebCoreSupport/ChromiumInit.h index 74b71b4..235c3dc 100644 --- a/WebKit/android/WebCoreSupport/ChromiumLogging.h +++ b/WebKit/android/WebCoreSupport/ChromiumInit.h @@ -32,7 +32,7 @@ namespace android { // // This only calls into chromium once, but can be called multiple times. // It should be called before any other calls into external/chromium. -void initChromiumLogging(); +void initChromium(); } #endif diff --git a/WebKit/android/WebCoreSupport/WebRequestContext.cpp b/WebKit/android/WebCoreSupport/WebRequestContext.cpp index 3268abb..85cfeab 100644 --- a/WebKit/android/WebCoreSupport/WebRequestContext.cpp +++ b/WebKit/android/WebCoreSupport/WebRequestContext.cpp @@ -27,7 +27,7 @@ #include "WebRequestContext.h" #include "ChromiumIncludes.h" -#include "ChromiumLogging.h" +#include "ChromiumInit.h" #include "WebCache.h" #include "WebCookieJar.h" @@ -49,7 +49,7 @@ WebRequestContext::WebRequestContext(bool isPrivateBrowsing) : m_isPrivateBrowsing(isPrivateBrowsing) { // Initialize chromium logging, needs to be done before any chromium code is called. - initChromiumLogging(); + initChromium(); WebCache* cache = WebCache::get(m_isPrivateBrowsing); host_resolver_ = cache->hostResolver(); diff --git a/WebKit/android/jni/WebCoreFrameBridge.cpp b/WebKit/android/jni/WebCoreFrameBridge.cpp index b9b4b75..1ddbb82 100644 --- a/WebKit/android/jni/WebCoreFrameBridge.cpp +++ b/WebKit/android/jni/WebCoreFrameBridge.cpp @@ -33,7 +33,7 @@ #include "MemoryCache.h" #include "Chrome.h" #include "ChromeClientAndroid.h" -#include "ChromiumLogging.h" +#include "ChromiumInit.h" #include "ContextMenuClientAndroid.h" #include "DeviceMotionClientAndroid.h" #include "DeviceOrientationClientAndroid.h" @@ -1036,8 +1036,8 @@ static void CreateFrame(JNIEnv* env, jobject obj, jobject javaview, jobject jAss ScriptController::initializeThreading(); #if USE(CHROME_NETWORK_STACK) - // Initialize chromium logging, needs to be done before any chromium code is called - initChromiumLogging(); + // needs to be called before any other chromium code + initChromium(); #endif #ifdef ANDROID_INSTRUMENT |