summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-07-22 11:59:32 +0100
committerKristian Monsen <kristianm@google.com>2010-08-12 17:01:42 +0100
commit3e1fb9526199fc05fdb2266189e71728299745c0 (patch)
tree10a279338c2fce87a393712076685b7192cb248d /WebKit
parentd3b240ac2e4c7440dfc9557c64aae1697b273a27 (diff)
downloadexternal_webkit-3e1fb9526199fc05fdb2266189e71728299745c0.zip
external_webkit-3e1fb9526199fc05fdb2266189e71728299745c0.tar.gz
external_webkit-3e1fb9526199fc05fdb2266189e71728299745c0.tar.bz2
Connecting cookies set from WebCore to the chromium cookies
Change-Id: Id6c9cfc92ba2aeaae15724e789e9531a451e04fa
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/WebCoreSupport/PlatformBridge.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/WebKit/android/WebCoreSupport/PlatformBridge.cpp b/WebKit/android/WebCoreSupport/PlatformBridge.cpp
index 833deb5..31e3101 100644
--- a/WebKit/android/WebCoreSupport/PlatformBridge.cpp
+++ b/WebKit/android/WebCoreSupport/PlatformBridge.cpp
@@ -33,6 +33,7 @@
#include "KeyGeneratorClient.h"
#include "PluginView.h"
#include "WebCoreFrameBridge.h"
+#include "WebRequestContext.h"
#include "WebViewCore.h"
#include "npruntime.h"
#include <wtf/android/AndroidThreading.h>
@@ -62,20 +63,33 @@ String PlatformBridge::getSignedPublicKeyAndChallengeString(unsigned index, cons
void PlatformBridge::setCookies(const KURL& url, const String& value)
{
+#if USE(CHROME_NETWORK_STACK)
+ std::string cookieValue(value.utf8().data());
+ GURL cookieGurl(url.string().utf8().data());
+ WebRequestContext::GetAndroidContext()->cookie_store()->SetCookie(cookieGurl ,cookieValue);
+#else
CookieClient* client = JavaSharedClient::GetCookieClient();
if (!client)
return;
client->setCookies(url, value);
+#endif
}
String PlatformBridge::cookies(const KURL& url)
{
+#if USE(CHROME_NETWORK_STACK)
+ GURL cookieGurl(url.string().utf8().data());
+ std::string cookies = WebRequestContext::GetAndroidContext()->cookie_store()->GetCookies(cookieGurl);
+ String cookieString(cookies.c_str());
+ return cookieString;
+#else
CookieClient* client = JavaSharedClient::GetCookieClient();
if (!client)
return String();
return client->cookies(url);
+#endif
}
bool PlatformBridge::cookiesEnabled()