Move cookie support to PlatformBridge
diff --git a/WebCore/platform/android/PlatformBridge.h b/WebCore/platform/android/PlatformBridge.h
index 977a0fd..bd2a313 100644
--- a/WebCore/platform/android/PlatformBridge.h
+++ b/WebCore/platform/android/PlatformBridge.h
@@ -48,6 +48,11 @@
     // KeyGenerator
     static WTF::Vector<String> getSupportedKeyStrengthList();
     static String getSignedPublicKeyAndChallengeString(unsigned index, const String& challenge, const KURL&);
+    // Cookies
+    static void setCookies(const KURL&, const String& value);
+    static String cookies(const KURL&);
+    static bool cookiesEnabled();
 };
+
 }
 #endif // PlatformBridge_h
diff --git a/WebCore/platform/network/android/Cookie.cpp b/WebCore/platform/network/android/Cookie.cpp
index 3d10e4a..c0b7c7b 100644
--- a/WebCore/platform/network/android/Cookie.cpp
+++ b/WebCore/platform/network/android/Cookie.cpp
@@ -25,10 +25,7 @@
 
 #include "config.h"
 
-#include "CookieClient.h"
-#include "JavaSharedClient.h"
-
-using namespace android;
+#include "PlatformBridge.h"
 
 namespace WebCore {
 
@@ -36,22 +33,17 @@
 
 void setCookies(Document*, const KURL& url, const String& value)
 {
-    if (JavaSharedClient::GetCookieClient())
-        JavaSharedClient::GetCookieClient()->setCookies(url, value);
+    PlatformBridge::setCookies(url, value);
 }
 
-String cookies(const Document* , const KURL& url)
+String cookies(const Document*, const KURL& url)
 {
-    if (JavaSharedClient::GetCookieClient())
-        return JavaSharedClient::GetCookieClient()->cookies(url);
-    return String();
+    return PlatformBridge::cookies(url);
 }
 
-bool cookiesEnabled(const Document* )
+bool cookiesEnabled(const Document*)
 {
-    if (JavaSharedClient::GetCookieClient())
-        return JavaSharedClient::GetCookieClient()->cookiesEnabled();
-    return false;
+    return PlatformBridge::cookiesEnabled();
 }
 
 }
diff --git a/WebCore/platform/network/android/CookieClient.h b/WebKit/android/WebCoreSupport/CookieClient.h
similarity index 96%
rename from WebCore/platform/network/android/CookieClient.h
rename to WebKit/android/WebCoreSupport/CookieClient.h
index be2963e..56d9382 100644
--- a/WebCore/platform/network/android/CookieClient.h
+++ b/WebKit/android/WebCoreSupport/CookieClient.h
@@ -26,8 +26,8 @@
 #ifndef COOKIE_CLIENT_H
 #define COOKIE_CLIENT_H
 
-#include "KURL.h"
-#include "PlatformString.h"
+#include <KURL.h>
+#include <PlatformString.h>
 
 using namespace WebCore;
 
diff --git a/WebKit/android/WebCoreSupport/PlatformBridge.cpp b/WebKit/android/WebCoreSupport/PlatformBridge.cpp
index e4fe4ce..353943c 100644
--- a/WebKit/android/WebCoreSupport/PlatformBridge.cpp
+++ b/WebKit/android/WebCoreSupport/PlatformBridge.cpp
@@ -24,8 +24,10 @@
  */
 
 #include "config.h"
-#include "PlatformBridge.h"
 
+#include <PlatformBridge.h>
+
+#include "CookieClient.h"
 #include "JavaSharedClient.h"
 #include "KeyGeneratorClient.h"
 
@@ -51,4 +53,32 @@
     return client->getSignedPublicKeyAndChallengeString(index, challenge, url);
 }
 
+void PlatformBridge::setCookies(const KURL& url, const String& value)
+{
+    CookieClient* client = JavaSharedClient::GetCookieClient();
+    if (!client)
+        return;
+
+    client->setCookies(url, value);
+}
+
+String PlatformBridge::cookies(const KURL& url)
+{
+    CookieClient* client = JavaSharedClient::GetCookieClient();
+    if (!client)
+        return String();
+
+    return client->cookies(url);
+}
+
+bool PlatformBridge::cookiesEnabled()
+{
+    CookieClient* client = JavaSharedClient::GetCookieClient();
+    if (!client)
+        return false;
+
+    return client->cookiesEnabled();
+}
+
+
 }
\ No newline at end of file