Diff
Modified: trunk/Source/Platform/ChangeLog (118079 => 118080)
--- trunk/Source/Platform/ChangeLog 2012-05-22 23:28:28 UTC (rev 118079)
+++ trunk/Source/Platform/ChangeLog 2012-05-22 23:41:18 UTC (rev 118080)
@@ -1,3 +1,32 @@
+2012-05-22 Mark Pilgrim <[email protected]>
+
+ [Chromium] Move cookieJar to Platform.h
+ https://bugs.webkit.org/show_bug.cgi?id=86755
+
+ Reviewed by Adam Barth.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * Platform.gypi:
+ * chromium/public/Platform.h:
+ (WebKit):
+ (Platform):
+ (WebKit::Platform::cookieJar):
+ * chromium/public/WebCookie.h: Added.
+ (WebKit):
+ (WebKit::WebCookie::WebCookie):
+ (WebCookie):
+ * chromium/public/WebCookieJar.h: Added.
+ (WebKit):
+ (WebCookieJar):
+ (WebKit::WebCookieJar::setCookie):
+ (WebKit::WebCookieJar::cookies):
+ (WebKit::WebCookieJar::cookieRequestHeaderFieldValue):
+ (WebKit::WebCookieJar::rawCookies):
+ (WebKit::WebCookieJar::deleteCookie):
+ (WebKit::WebCookieJar::cookiesEnabled):
+ (WebKit::WebCookieJar::~WebCookieJar):
+
2012-05-22 Gavin Peters <[email protected]>
[Chromium] Remove old staging enum value WebURLRequest::TargetType::TargetIsPrerender
Modified: trunk/Source/Platform/Platform.gypi (118079 => 118080)
--- trunk/Source/Platform/Platform.gypi 2012-05-22 23:28:28 UTC (rev 118079)
+++ trunk/Source/Platform/Platform.gypi 2012-05-22 23:41:18 UTC (rev 118080)
@@ -43,6 +43,8 @@
'chromium/public/WebCommon.h',
'chromium/public/WebContentLayer.h',
'chromium/public/WebContentLayerClient.h',
+ 'chromium/public/WebCookie.h',
+ 'chromium/public/WebCookieJar.h',
'chromium/public/WebData.h',
'chromium/public/WebDragData.h',
'chromium/public/WebExternalTextureLayer.h',
Modified: trunk/Source/Platform/chromium/public/Platform.h (118079 => 118080)
--- trunk/Source/Platform/chromium/public/Platform.h 2012-05-22 23:28:28 UTC (rev 118079)
+++ trunk/Source/Platform/chromium/public/Platform.h 2012-05-22 23:41:18 UTC (rev 118080)
@@ -43,6 +43,7 @@
class WebAudioBus;
class WebBlobRegistry;
class WebClipboard;
+class WebCookieJar;
class WebFileSystem;
class WebFileUtilities;
class WebMediaStreamCenter;
@@ -64,6 +65,9 @@
WEBKIT_EXPORT static void shutdown();
WEBKIT_EXPORT static Platform* current();
+ // May return null.
+ virtual WebCookieJar* cookieJar() { return 0; }
+
// Must return non-null.
virtual WebClipboard* clipboard() { return 0; }
Copied: trunk/Source/Platform/chromium/public/WebCookie.h (from rev 118078, trunk/Source/WebKit/chromium/public/platform/WebCookie.h) (0 => 118080)
--- trunk/Source/Platform/chromium/public/WebCookie.h (rev 0)
+++ trunk/Source/Platform/chromium/public/WebCookie.h 2012-05-22 23:41:18 UTC (rev 118080)
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "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.
+ */
+
+#ifndef WebCookie_h
+#define WebCookie_h
+
+#include "WebCommon.h"
+#include "WebString.h"
+
+namespace WebKit {
+
+// A cookie.
+//
+struct WebCookie {
+ WebCookie()
+ : expires(0)
+ , httpOnly(false)
+ , secure(false)
+ , session(false)
+ {
+ }
+
+ WebCookie(const WebString& name, const WebString& value, const WebString& domain,
+ const WebString& path, double expires, bool httpOnly, bool secure, bool session)
+ : name(name)
+ , value(value)
+ , domain(domain)
+ , path(path)
+ , expires(expires)
+ , httpOnly(httpOnly)
+ , secure(secure)
+ , session(session)
+ {
+ }
+
+ WebString name;
+ WebString value;
+ WebString domain;
+ WebString path;
+ double expires;
+ bool httpOnly;
+ bool secure;
+ bool session;
+};
+
+} // namespace WebKit
+
+#endif
Copied: trunk/Source/Platform/chromium/public/WebCookieJar.h (from rev 118078, trunk/Source/WebKit/chromium/public/platform/WebCookieJar.h) (0 => 118080)
--- trunk/Source/Platform/chromium/public/WebCookieJar.h (rev 0)
+++ trunk/Source/Platform/chromium/public/WebCookieJar.h 2012-05-22 23:41:18 UTC (rev 118080)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "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.
+ */
+
+#ifndef WebCookieJar_h
+#define WebCookieJar_h
+
+#include "WebString.h"
+
+namespace WebKit {
+class WebURL;
+struct WebCookie;
+template <typename T> class WebVector;
+
+class WebCookieJar {
+public:
+ virtual void setCookie(const WebURL&, const WebURL& firstPartyForCookies, const WebString& cookie) { }
+ virtual WebString cookies(const WebURL&, const WebURL& firstPartyForCookies) { return WebString(); }
+ virtual WebString cookieRequestHeaderFieldValue(const WebURL&, const WebURL& firstPartyForCookies) { return WebString(); }
+ virtual void rawCookies(const WebURL&, const WebURL& firstPartyForCookies, WebVector<WebCookie>&) { }
+ virtual void deleteCookie(const WebURL&, const WebString& cookieName) { }
+ virtual bool cookiesEnabled(const WebURL&, const WebURL& firstPartyForCookies) { return true; }
+
+protected:
+ ~WebCookieJar() { }
+};
+
+} // namespace WebKit
+
+#endif
Modified: trunk/Source/WebKit/chromium/ChangeLog (118079 => 118080)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-05-22 23:28:28 UTC (rev 118079)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-05-22 23:41:18 UTC (rev 118080)
@@ -1,3 +1,21 @@
+2012-05-22 Mark Pilgrim <[email protected]>
+
+ [Chromium] Move cookieJar to Platform.h
+ https://bugs.webkit.org/show_bug.cgi?id=86755
+
+ Reviewed by Adam Barth.
+
+ Part of a refactoring series. See tracking bug 82948.
+
+ * WebKit.gyp:
+ * public/platform/WebCookie.h:
+ * public/platform/WebCookieJar.h:
+ * public/platform/WebKitPlatformSupport.h:
+ (WebKit):
+ (WebKit::WebKitPlatformSupport::themeEngine):
+ * src/PlatformSupport.cpp:
+ (WebCore::getCookieJar):
+
2012-05-22 Jochen Eisinger <[email protected]>
Unreviewed. Rolled DEPS.
Modified: trunk/Source/WebKit/chromium/WebKit.gyp (118079 => 118080)
--- trunk/Source/WebKit/chromium/WebKit.gyp 2012-05-22 23:28:28 UTC (rev 118079)
+++ trunk/Source/WebKit/chromium/WebKit.gyp 2012-05-22 23:41:18 UTC (rev 118080)
@@ -302,8 +302,6 @@
'public/platform/WebCommon.h',
'public/platform/WebContentLayer.h',
'public/platform/WebContentLayerClient.h',
- 'public/platform/WebCookie.h',
- 'public/platform/WebCookieJar.h',
'public/platform/WebData.h',
'public/platform/WebExternalTextureLayer.h',
'public/platform/WebFloatPoint.h',
Modified: trunk/Source/WebKit/chromium/public/platform/WebCookie.h (118079 => 118080)
--- trunk/Source/WebKit/chromium/public/platform/WebCookie.h 2012-05-22 23:28:28 UTC (rev 118079)
+++ trunk/Source/WebKit/chromium/public/platform/WebCookie.h 2012-05-22 23:41:18 UTC (rev 118080)
@@ -28,48 +28,4 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebCookie_h
-#define WebCookie_h
-
-#include "WebCommon.h"
-#include "WebString.h"
-
-namespace WebKit {
-
-// A cookie.
-//
-struct WebCookie {
- WebCookie()
- : expires(0)
- , httpOnly(false)
- , secure(false)
- , session(false)
- {
- }
-
- WebCookie(const WebString& name, const WebString& value, const WebString& domain,
- const WebString& path, double expires, bool httpOnly, bool secure, bool session)
- : name(name)
- , value(value)
- , domain(domain)
- , path(path)
- , expires(expires)
- , httpOnly(httpOnly)
- , secure(secure)
- , session(session)
- {
- }
-
- WebString name;
- WebString value;
- WebString domain;
- WebString path;
- double expires;
- bool httpOnly;
- bool secure;
- bool session;
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebCookie.h"
Modified: trunk/Source/WebKit/chromium/public/platform/WebCookieJar.h (118079 => 118080)
--- trunk/Source/WebKit/chromium/public/platform/WebCookieJar.h 2012-05-22 23:28:28 UTC (rev 118079)
+++ trunk/Source/WebKit/chromium/public/platform/WebCookieJar.h 2012-05-22 23:41:18 UTC (rev 118080)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2009 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -28,29 +28,4 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebCookieJar_h
-#define WebCookieJar_h
-
-#include "WebString.h"
-
-namespace WebKit {
-class WebURL;
-struct WebCookie;
-template <typename T> class WebVector;
-
-class WebCookieJar {
-public:
- virtual void setCookie(const WebURL&, const WebURL& firstPartyForCookies, const WebString& cookie) { }
- virtual WebString cookies(const WebURL&, const WebURL& firstPartyForCookies) { return WebString(); }
- virtual WebString cookieRequestHeaderFieldValue(const WebURL&, const WebURL& firstPartyForCookies) { return WebString(); }
- virtual void rawCookies(const WebURL&, const WebURL& firstPartyForCookies, WebVector<WebCookie>&) { }
- virtual void deleteCookie(const WebURL&, const WebString& cookieName) { }
- virtual bool cookiesEnabled(const WebURL&, const WebURL& firstPartyForCookies) { return true; }
-
-protected:
- ~WebCookieJar() { }
-};
-
-} // namespace WebKit
-
-#endif
+#include "../../../../Platform/chromium/public/WebCookieJar.h"
Modified: trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h (118079 => 118080)
--- trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h 2012-05-22 23:28:28 UTC (rev 118079)
+++ trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h 2012-05-22 23:41:18 UTC (rev 118080)
@@ -49,7 +49,6 @@
class WebApplicationCacheHost; // FIXME: Does this belong in platform?
class WebApplicationCacheHostClient; // FIXME: Does this belong in platform?
-class WebCookieJar;
class WebIDBFactory; // FIXME: Does this belong in platform?
class WebIDBKey; // FIXME: Does this belong in platform?
class WebIDBKeyPath; // FIXME: Does this belong in platform?
@@ -69,9 +68,6 @@
// May return null on some platforms.
virtual WebThemeEngine* themeEngine() { return 0; }
- // May return null.
- virtual WebCookieJar* cookieJar() { return 0; }
-
// DOM Storage --------------------------------------------------
// Return a LocalStorage namespace that corresponds to the following path.
Modified: trunk/Source/WebKit/chromium/src/PlatformSupport.cpp (118079 => 118080)
--- trunk/Source/WebKit/chromium/src/PlatformSupport.cpp 2012-05-22 23:28:28 UTC (rev 118079)
+++ trunk/Source/WebKit/chromium/src/PlatformSupport.cpp 2012-05-22 23:41:18 UTC (rev 118080)
@@ -50,8 +50,6 @@
#include "WebViewImpl.h"
#include "WebWorkerClientImpl.h"
#include "platform/WebAudioBus.h"
-#include "platform/WebCookie.h"
-#include "platform/WebCookieJar.h"
#include "platform/WebData.h"
#include "platform/WebDragData.h"
#include "platform/WebImage.h"
@@ -95,6 +93,8 @@
#include "Worker.h"
#include "WorkerContextProxy.h"
#include <public/WebClipboard.h>
+#include <public/WebCookie.h>
+#include <public/WebCookieJar.h>
#include <public/WebMimeRegistry.h>
#include <public/WebWorkerRunLoop.h>
#include <wtf/Assertions.h>
@@ -135,7 +135,7 @@
return 0;
WebCookieJar* cookieJar = frameImpl->client()->cookieJar(frameImpl);
if (!cookieJar)
- cookieJar = webKitPlatformSupport()->cookieJar();
+ cookieJar = WebKit::Platform::current()->cookieJar();
return cookieJar;
}