Get rid of setCookieStoragePrivateBrowsingEnabled.
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Nov 2012 22:07:46 +0000 (22:07 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Nov 2012 22:07:46 +0000 (22:07 +0000)
        https://bugs.webkit.org/show_bug.cgi?id=101247

        Reviewed by Brady Eidson.

        We were only doing anything here on Mac, and only because we couldn't know if
        sessions were in use. But sessions are always in use, and those obsolete changing
        cookie storage explicitly.

        * platform/network/win/CookieStorageWin.cpp: Removed.
        * PlatformWinCE.cmake:
        * WebCore.gypi:
        No more CookieStorageWin.cpp with an empty implementation.

        * WebCore.exp.in:
        * platform/mac/WebCoreSystemInterface.h:
        * platform/mac/WebCoreSystemInterface.mm:
        We no longer need this WKSI function.

        * page/Settings.cpp: (WebCore::Settings::setPrivateBrowsingEnabled):
        Removed the only call to setCookieStoragePrivateBrowsingEnabled().

        * platform/network/CookieStorage.h:
        * platform/network/cf/CookieStorageCFNet.cpp:
        * platform/network/curl/CookieJarCurl.cpp:
        * platform/network/soup/CookieStorageSoup.cpp:
        * platform/qt/TemporaryLinkStubsQt.cpp:
        Removed empty setCookieStoragePrivateBrowsingEnabled implementations.

        * platform/network/mac/CookieStorageMac.mm: This function used to have a FIXME
        that we should observe private storage while in private browsing mode. I don't think
        that it was correct - Safari doesn't display content of private storage, and thus
        doesn't need to know about changes.
        The removal of this function has an effect on WebKit1 clients that enable private
        browsing. We used to globally change cookie storage, even for loads not initiated
        by WebKit. Now we match API description: "If private browsing is enabled, WebKit
        will not store information about sites the user visits."

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@133524 268f45cc-cd09-0410-ab3c-d52691b4dbfc

21 files changed:
Source/WebCore/ChangeLog
Source/WebCore/PlatformWinCE.cmake
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.gypi
Source/WebCore/page/Settings.cpp
Source/WebCore/platform/mac/WebCoreSystemInterface.h
Source/WebCore/platform/mac/WebCoreSystemInterface.mm
Source/WebCore/platform/network/CookieStorage.h
Source/WebCore/platform/network/cf/CookieStorageCFNet.cpp
Source/WebCore/platform/network/curl/CookieJarCurl.cpp
Source/WebCore/platform/network/mac/CookieStorageMac.mm
Source/WebCore/platform/network/soup/CookieStorageSoup.cpp
Source/WebCore/platform/network/win/CookieStorageWin.cpp [deleted file]
Source/WebCore/platform/qt/TemporaryLinkStubsQt.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h

index dd11121..f6516cc 100644 (file)
@@ -1,3 +1,43 @@
+2012-11-05  Alexey Proskuryakov  <ap@apple.com>
+
+        Get rid of setCookieStoragePrivateBrowsingEnabled.
+        https://bugs.webkit.org/show_bug.cgi?id=101247
+
+        Reviewed by Brady Eidson.
+
+        We were only doing anything here on Mac, and only because we couldn't know if
+        sessions were in use. But sessions are always in use, and those obsolete changing
+        cookie storage explicitly.
+
+        * platform/network/win/CookieStorageWin.cpp: Removed.
+        * PlatformWinCE.cmake:
+        * WebCore.gypi:
+        No more CookieStorageWin.cpp with an empty implementation.
+    
+        * WebCore.exp.in:
+        * platform/mac/WebCoreSystemInterface.h:
+        * platform/mac/WebCoreSystemInterface.mm:
+        We no longer need this WKSI function.
+
+        * page/Settings.cpp: (WebCore::Settings::setPrivateBrowsingEnabled):
+        Removed the only call to setCookieStoragePrivateBrowsingEnabled().
+
+        * platform/network/CookieStorage.h:
+        * platform/network/cf/CookieStorageCFNet.cpp:
+        * platform/network/curl/CookieJarCurl.cpp:
+        * platform/network/soup/CookieStorageSoup.cpp:
+        * platform/qt/TemporaryLinkStubsQt.cpp:
+        Removed empty setCookieStoragePrivateBrowsingEnabled implementations.
+
+        * platform/network/mac/CookieStorageMac.mm: This function used to have a FIXME
+        that we should observe private storage while in private browsing mode. I don't think
+        that it was correct - Safari doesn't display content of private storage, and thus
+        doesn't need to know about changes.
+        The removal of this function has an effect on WebKit1 clients that enable private
+        browsing. We used to globally change cookie storage, even for loads not initiated
+        by WebKit. Now we match API description: "If private browsing is enabled, WebKit
+        will not store information about sites the user visits."
+
 2012-11-05  Florin Malita  <fmalita@chromium.org>
 
         Crash when mixing layers, foreignObjects and SVG hidden containers
index ca23c5e..4c9317f 100644 (file)
@@ -80,7 +80,6 @@ LIST(APPEND WebCore_SOURCES
 
     platform/network/win/CredentialStorageWin.cpp
     platform/network/win/CookieJarWin.cpp
-    platform/network/win/CookieStorageWin.cpp
     platform/network/win/NetworkStateNotifierWin.cpp
     platform/network/win/ProxyServerWin.cpp
     platform/network/win/ResourceHandleWin.cpp
index f6d186d..a2d8368 100644 (file)
@@ -1536,7 +1536,6 @@ _wkSetBaseCTM
 _wkSetCFURLResponseMIMEType
 _wkSetCONNECTProxyAuthorizationForStream
 _wkSetCONNECTProxyForStream
-_wkSetCookieStoragePrivateBrowsingEnabled
 _wkSetHTTPCookieAcceptPolicy
 _wkSetHTTPCookiesForURL
 _wkSetHTTPPipeliningMaximumPriority
index cac7252..1228bda 100644 (file)
             'platform/network/soup/SoupURIUtils.h',
             'platform/network/win/AuthenticationChallenge.h',
             'platform/network/win/CookieJarWin.cpp',
-            'platform/network/win/CookieStorageWin.cpp',
             'platform/network/win/DownloadBundleWin.cpp',
             'platform/network/win/NetworkStateNotifierWin.cpp',
             'platform/network/win/ProxyServerWin.cpp',
index 871584c..ce7669a 100644 (file)
@@ -593,7 +593,6 @@ void Settings::setPrivateBrowsingEnabled(bool privateBrowsingEnabled)
 #if PLATFORM(MAC) || USE(CFNETWORK)
     ResourceHandle::setPrivateBrowsingEnabled(privateBrowsingEnabled);
 #endif
-    setCookieStoragePrivateBrowsingEnabled(privateBrowsingEnabled);
 
     if (m_privateBrowsingEnabled == privateBrowsingEnabled)
         return;
index b87dfe0..8fa28c7 100644 (file)
@@ -193,7 +193,6 @@ extern NSArray *(*wkQTGetSitesInMediaDownloadCache)();
 extern void (*wkQTClearMediaDownloadCacheForSite)(NSString *site);
 extern void (*wkQTClearMediaDownloadCache)();
 extern void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*);
-extern void (*wkSetCookieStoragePrivateBrowsingEnabled)(BOOL);
 extern void (*wkSetDragImage)(NSImage*, NSPoint offset);
 extern void (*wkSetNSURLConnectionDefersCallbacks)(NSURLConnection *, BOOL);
 extern void (*wkSetNSURLRequestShouldContentSniff)(NSMutableURLRequest *, BOOL);
index 948d353..2761778 100644 (file)
@@ -86,7 +86,6 @@ void (*wkQTClearMediaDownloadCacheForSite)(NSString *site);
 void (*wkQTClearMediaDownloadCache)();
 
 void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*);
-void (*wkSetCookieStoragePrivateBrowsingEnabled)(BOOL);
 void (*wkSetDragImage)(NSImage*, NSPoint offset);
 void (*wkSetBaseCTM)(CGContextRef, CGAffineTransform);
 void (*wkSetPatternPhaseInUserSpace)(CGContextRef, CGPoint point);
index ad8e91f..d8fead8 100644 (file)
@@ -30,7 +30,7 @@
 
 namespace WebCore {
 
-void setCookieStoragePrivateBrowsingEnabled(bool);
+// These are always observing the main cookie storage, even when in private browsing mode.
 void startObservingCookieChanges();
 void stopObservingCookieChanges();
 
index 50e4ae6..efa825d 100644 (file)
@@ -83,16 +83,6 @@ void overrideCookieStorage(CFHTTPCookieStorageRef cookieStorage)
     cookieStorageOverride().adoptCF(cookieStorage);
 }
 
-void setCookieStoragePrivateBrowsingEnabled(bool)
-{
-    ASSERT(isMainThread());
-
-    // Nothing to do here - we'll just use a private session from ResourceHandle.
-
-    // FIXME: When Private Browsing is enabled, the Private Browsing Cookie Storage should be
-    // observed for changes, not the default Cookie Storage.
-}
-
 static void notifyCookiesChangedOnMainThread(void*)
 {
     ASSERT(isMainThread());
index 8e802c3..b522dbc 100644 (file)
@@ -61,13 +61,6 @@ void deleteCookie(const Document*, const KURL&, const String&)
     // FIXME: Not yet implemented
 }
 
-#if !PLATFORM(EFL)
-void setCookieStoragePrivateBrowsingEnabled(bool enabled)
-{
-    // FIXME: Not yet implemented
-}
-#endif
-
 void getHostnamesWithCookies(HashSet<String>& hostnames)
 {
     // FIXME: Not yet implemented
index 2116d35..8c25211 100644 (file)
@@ -77,16 +77,6 @@ using namespace WebCore;
 
 namespace WebCore {
 
-void setCookieStoragePrivateBrowsingEnabled(bool enabled)
-{
-    // FIXME: When Private Browsing is enabled, the Private Browsing Cookie Storage should be
-    // observed for changes, not the default Cookie Storage.
-
-    // There is nothing to do here if sessions are supported. But we don't know if they are,
-    // so enable legacy private browsing mode on sharedHTTPCookieStorage, too.
-    wkSetCookieStoragePrivateBrowsingEnabled(enabled);
-}
-
 static WebCookieStorageObjCAdapter *cookieStorageAdapter;
 
 void startObservingCookieChanges()
index bc87afb..1f5c670 100644 (file)
 
 namespace WebCore {
 
-void setCookieStoragePrivateBrowsingEnabled(bool)
-{
-    notImplemented();
-}
-
 #if USE(PLATFORM_STRATEGIES)
 static void soupCookiesChanged(SoupCookieJar* jar, SoupCookie*, SoupCookie*, gpointer)
 {
diff --git a/Source/WebCore/platform/network/win/CookieStorageWin.cpp b/Source/WebCore/platform/network/win/CookieStorageWin.cpp
deleted file mode 100644 (file)
index c1ec33d..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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 APPLE AND ITS 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 APPLE OR ITS 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 "CookieStorage.h"
-
-#include "NotImplemented.h"
-
-namespace WebCore {
-
-void setCookieStoragePrivateBrowsingEnabled(bool)
-{
-    notImplemented();
-}
-
-} // namespace WebCore
index 12c54f2..030a2ff 100644 (file)
@@ -88,10 +88,6 @@ bool PluginDatabase::isPreferredPluginDirectory(const String& directory)
     return false;
 }
 
-void PluginView::privateBrowsingStateChanged(bool)
-{
-}
-
 PassRefPtr<JSC::Bindings::Instance> PluginView::bindingInstance()
 {
     return 0;
index 0b071ec..00d2c9a 100644 (file)
@@ -1,3 +1,13 @@
+2012-11-05  Alexey Proskuryakov  <ap@apple.com>
+
+        Get rid of setCookieStoragePrivateBrowsingEnabled.
+        https://bugs.webkit.org/show_bug.cgi?id=101247
+
+        Reviewed by Brady Eidson.
+
+        * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): We no longer
+        have this function.
+
 2012-11-03  Alexey Proskuryakov  <ap@apple.com>
 
         Get rid of USE(CFURLSTORAGESESSIONS)
index 367572d..e377db2 100644 (file)
@@ -93,7 +93,6 @@ void InitWebCoreSystemInterface(void)
     INIT(SetCGFontRenderingMode);
     INIT(SetCONNECTProxyAuthorizationForStream);
     INIT(SetCONNECTProxyForStream);
-    INIT(SetCookieStoragePrivateBrowsingEnabled);
     INIT(SetDragImage);
     INIT(SetHTTPPipeliningMaximumPriority);
     INIT(SetHTTPPipeliningPriority);
index 331a059..19ec763 100644 (file)
@@ -1,3 +1,16 @@
+2012-11-05  Alexey Proskuryakov  <ap@apple.com>
+
+        Get rid of setCookieStoragePrivateBrowsingEnabled.
+        https://bugs.webkit.org/show_bug.cgi?id=101247
+
+        Reviewed by Brady Eidson.
+
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::switchNetworkLoaderToNewTestingSession): Added a FIXME.
+
+        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
+        We no longer have this function.
+
 2012-11-05  Simon Fraser  <simon.fraser@apple.com>
 
         Fix layer borders to cleaning appear and disappear on switching
index bc971fb..82c1220 100644 (file)
@@ -285,6 +285,7 @@ void InjectedBundle::switchNetworkLoaderToNewTestingSession()
 {
 #if PLATFORM(MAC) || USE(CFNETWORK)
     // Set a private session for testing to avoid interfering with global cookies. This should be different from private browsing session.
+    // FIXME (NetworkProcess): Do this in network process, too.
     RetainPtr<CFURLStorageSessionRef> session = ResourceHandle::createPrivateBrowsingStorageSession(CFSTR("Private WebKit Session"));
     ResourceHandle::setDefaultStorageSession(session.get());
 #endif
index e49a781..73f8cbc 100644 (file)
@@ -100,7 +100,6 @@ void InitWebCoreSystemInterface(void)
         INIT(SetCGFontRenderingMode);
         INIT(SetCONNECTProxyAuthorizationForStream);
         INIT(SetCONNECTProxyForStream);
-        INIT(SetCookieStoragePrivateBrowsingEnabled);
         INIT(SetDragImage);
         INIT(SetHTTPPipeliningMaximumPriority);
         INIT(SetHTTPPipeliningPriority);
index abe2967..8d54d67 100644 (file)
@@ -1,3 +1,12 @@
+2012-11-05  Alexey Proskuryakov  <ap@apple.com>
+
+        Get rid of setCookieStoragePrivateBrowsingEnabled.
+        https://bugs.webkit.org/show_bug.cgi?id=101247
+
+        Reviewed by Brady Eidson.
+
+        * WebKitSystemInterface.h: Removed the function.
+
 2012-11-02  Anders Carlsson  <andersca@apple.com>
 
         Don't instantiate the Java plug-in if it's inactive
index 353f0b9..2cc6fe9 100644 (file)
@@ -68,8 +68,6 @@ void WKDisableCGDeferredUpdates(void);
 Class WKNSURLProtocolClassForRequest(NSURLRequest *request);
 void WKSetNSURLRequestShouldContentSniff(NSMutableURLRequest *request, BOOL shouldContentSniff);
 
-void WKSetCookieStoragePrivateBrowsingEnabled(BOOL enabled);
-
 unsigned WKGetNSAutoreleasePoolCount(void);
 
 void WKAdvanceDefaultButtonPulseAnimation(NSButtonCell *button);