From 8457f5dc1324682e3874821191e733aa37d95edb Mon Sep 17 00:00:00 2001 From: Andrei Popescu Date: Thu, 17 Dec 2009 13:31:38 +0000 Subject: Update the cookie code in platform/network to match the code upstreamed in https://bugs.webkit.org/show_bug.cgi?id=32559 --- WebCore/Android.mk | 2 +- .../network/android/AuthenticationChallenge.h | 2 - WebCore/platform/network/android/Cookie.cpp | 49 ---------------------- .../platform/network/android/CookieJarAndroid.cpp | 49 ++++++++++++++++++++++ 4 files changed, 50 insertions(+), 52 deletions(-) delete mode 100644 WebCore/platform/network/android/Cookie.cpp create mode 100644 WebCore/platform/network/android/CookieJarAndroid.cpp (limited to 'WebCore') diff --git a/WebCore/Android.mk b/WebCore/Android.mk index 46d9caa..1fdbcbb 100644 --- a/WebCore/Android.mk +++ b/WebCore/Android.mk @@ -514,7 +514,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \ platform/network/ResourceRequestBase.cpp \ platform/network/ResourceResponseBase.cpp \ \ - platform/network/android/Cookie.cpp \ + platform/network/android/CookieJarAndroid.cpp \ platform/network/android/NetworkStateNotifierAndroid.cpp \ platform/network/android/ResourceHandleAndroid.cpp \ platform/network/android/ResourceRequestAndroid.cpp \ diff --git a/WebCore/platform/network/android/AuthenticationChallenge.h b/WebCore/platform/network/android/AuthenticationChallenge.h index e272d60..954bfd8 100644 --- a/WebCore/platform/network/android/AuthenticationChallenge.h +++ b/WebCore/platform/network/android/AuthenticationChallenge.h @@ -31,8 +31,6 @@ namespace WebCore { -class ResourceHandle; - class AuthenticationChallenge : public AuthenticationChallengeBase { }; diff --git a/WebCore/platform/network/android/Cookie.cpp b/WebCore/platform/network/android/Cookie.cpp deleted file mode 100644 index c0b7c7b..0000000 --- a/WebCore/platform/network/android/Cookie.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2007, The Android Open Source Project - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#include "PlatformBridge.h" - -namespace WebCore { - -class Document; - -void setCookies(Document*, const KURL& url, const String& value) -{ - PlatformBridge::setCookies(url, value); -} - -String cookies(const Document*, const KURL& url) -{ - return PlatformBridge::cookies(url); -} - -bool cookiesEnabled(const Document*) -{ - return PlatformBridge::cookiesEnabled(); -} - -} diff --git a/WebCore/platform/network/android/CookieJarAndroid.cpp b/WebCore/platform/network/android/CookieJarAndroid.cpp new file mode 100644 index 0000000..ba4b5dc --- /dev/null +++ b/WebCore/platform/network/android/CookieJarAndroid.cpp @@ -0,0 +1,49 @@ +/* + * Copyright 2007, The Android Open Source Project + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#include "CookieJar.h" + +#include "PlatformBridge.h" + +namespace WebCore { + +void setCookies(Document*, const KURL& url, const String& value) +{ + PlatformBridge::setCookies(url, value); +} + +String cookies(const Document*, const KURL& url) +{ + return PlatformBridge::cookies(url); +} + +bool cookiesEnabled(const Document*) +{ + return PlatformBridge::cookiesEnabled(); +} + +} -- cgit v1.1