summaryrefslogtreecommitdiffstats
path: root/WebKit/android
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-12-01 16:04:54 +0000
committerKristian Monsen <kristianm@google.com>2010-12-02 12:48:28 +0000
commitf1db1f116e53299d77f6458ca3bfa5f0b4a160cb (patch)
treef3c759186f84281dcbbee1324322ea58c2287dc1 /WebKit/android
parent0dea64c9575802352241ad43b78e20198a6e137c (diff)
downloadexternal_webkit-f1db1f116e53299d77f6458ca3bfa5f0b4a160cb.zip
external_webkit-f1db1f116e53299d77f6458ca3bfa5f0b4a160cb.tar.gz
external_webkit-f1db1f116e53299d77f6458ca3bfa5f0b4a160cb.tar.bz2
Enable SPDY, and renames initChromiumLogging
initChromiumLogging is now renamed to the more generic initChromium, the files are renamed to ChromiumInit.* Change-Id: Ic9639d637f25e664b51d076b9b0ee58c2867c1b5
Diffstat (limited to 'WebKit/android')
-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.cpp4
-rw-r--r--WebKit/android/jni/WebCoreFrameBridge.cpp6
4 files changed, 14 insertions, 13 deletions
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