summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp7
-rw-r--r--WebKit/android/jni/CookieManager.cpp11
2 files changed, 16 insertions, 2 deletions
diff --git a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp
index 96ee9f6..26c377e 100644
--- a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp
+++ b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp
@@ -49,13 +49,18 @@
namespace android
{
+static URLRequestContext* WebAutoFillContextGetter()
+{
+ return WebRequestContext::GetContext(false /* isPrivateBrowsing */);
+}
+
WebAutoFill::WebAutoFill()
: mWebViewCore(0)
{
mFormManager = new FormManager();
mQueryId = 1;
- AndroidURLRequestContextGetter::Get()->SetURLRequestContextGetterFunction(&WebRequestContext::GetContext);
+ AndroidURLRequestContextGetter::Get()->SetURLRequestContextGetterFunction(&WebAutoFillContextGetter);
AndroidURLRequestContextGetter::Get()->SetIOThread(WebUrlLoaderClient::ioThread());
mTabContents = new TabContents();
mAutoFillManager = new AutoFillManager(mTabContents.get());
diff --git a/WebKit/android/jni/CookieManager.cpp b/WebKit/android/jni/CookieManager.cpp
index 037141f..89f9a4f 100644
--- a/WebKit/android/jni/CookieManager.cpp
+++ b/WebKit/android/jni/CookieManager.cpp
@@ -36,7 +36,15 @@ namespace android {
// JNI for android.webkit.CookieManager
static const char* javaCookieManagerClass = "android/webkit/CookieManager";
-static void removeAllCookie(JNIEnv* env, jobject) {
+static bool useChromiumHttpStack(JNIEnv*, jobject) {
+#if USE(CHROME_NETWORK_STACK)
+ return true;
+#else
+ return false;
+#endif
+}
+
+static void removeAllCookie(JNIEnv*, jobject) {
#if USE(CHROME_NETWORK_STACK)
WebRequestContext::GetContext(false)->cookie_store()->GetCookieMonster()->DeleteAllCreatedAfter(Time(), true);
// This will lazily create a new private browsing context. However, if the
@@ -49,6 +57,7 @@ static void removeAllCookie(JNIEnv* env, jobject) {
}
static JNINativeMethod gCookieManagerMethods[] = {
+ { "nativeUseChromiumHttpStack", "()Z", (void*) useChromiumHttpStack },
{ "nativeRemoveAllCookie", "()V", (void*) removeAllCookie },
};