Add a separate class for networking related storage
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 23 Dec 2012 02:15:18 +0000 (02:15 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 23 Dec 2012 02:15:18 +0000 (02:15 +0000)
commit437e761d382b7ab68c3da1ace540bd7d61ee7106
treecf3f8e25e4f5e3fced9949fc7664912037267668
parent79a9e30a2cc12f7e95c7e7f30efa453ed3e0617c
    Add a separate class for networking related storage
        https://bugs.webkit.org/show_bug.cgi?id=105676

        Reviewed by Sam Weinig.

        NetworkingContext combines a reference to storage (cookies and more) and data that's
        only meaningful when loading. This makes it very ugly to use for cookie manipulation
        when there is no load (e.g. for document.cookie).

        Adding NetworkStorageSession, which encorportes network-related sesion data, such
        as cookies and session HTTP credentials.

        For some ports, refactoring is not finished, NetworkStorageSession being a wrapper
        for NetworkingContext.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * Target.pri:
        * WebCore.exp.in:
        * WebCore.gypi:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        Updated for new files and functions.

        * platform/network/PlatformCookieJar.h:
        * loader/CookieJar.cpp:
        * platform/CookiesStrategy.h:
        * platform/network/cf/CookieJarCFNet.cpp:
        * platform/network/chromium/CookieJarChromium.cpp:
        * platform/network/curl/CookieJarCurl.cpp:
        * platform/network/mac/CookieJarMac.mm:
        * platform/network/qt/CookieJarQt.cpp:
        * platform/network/soup/CookieJarSoup.cpp:
        * platform/network/win/CookieJarWin.cpp:
        PlatformCookieJar and strategy cookie functions now take a NetworkStorageSession
        instead of NetworkingContext.
        Note that they take a const reference to support creating a temporary session
        wrapper for ports that just wrap a NetworkingContext.

        * loader/ResourceLoader.cpp:
        * loader/cache/CachedResource.h:
        * platform/network/BlobResourceHandle.cpp:
        * platform/network/ResourceHandle.cpp:
        * platform/network/ResourceHandle.h:
        * platform/network/ResourceHandleInternal.h:
        * platform/network/chromium/ResourceHandle.cpp:
        * platform/network/curl/ResourceHandleCurl.cpp:
        * platform/network/mac/ResourceHandleMac.mm:
        * platform/network/qt/QNetworkReplyHandler.cpp:
        * platform/network/soup/DNSSoup.cpp:
        * platform/network/soup/ResourceHandleSoup.cpp:
        * platform/network/win/ResourceHandleWin.cpp:
        ResourceHandle no longer includes unneeded NetworkingContext.h and AuthenticationClient.h.
        This avoids near-world rebuilds on any NetworkingContext change.

        * platform/network/NetworkStorageSession.h: Added.
        * platform/network/NetworkStorageSessionStub.cpp: Added.
        * platform/network/cf/NetworkStorageSessionCFNet.cpp: Added.
        Good new stuff. Stub version just wraps NetworkingContext for platforms that still
        need to finish the refactoring.

        * platform/network/NetworkingContext.h:
        The context now has a NetworkStorageSession, and doesn't expose CFNet level objects directly.

        * platform/network/cf/CookieStorageCFNet.cpp:
        * platform/network/cf/CookieStorageCFNet.h: Removed.
        We no longer have separate free functions to track storage, it's part of NetworkStorageSession now.

        * platform/network/cf/ResourceHandleCFNet.cpp: Updated to use NetworkStorageSession.

        * platform/network/mac/CookieStorageMac.mm: Dont include CookieStorageCFNet.h, it
        was not needed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@138413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
94 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/loader/CookieJar.cpp
Source/WebCore/loader/ResourceLoader.cpp
Source/WebCore/loader/cache/CachedResource.h
Source/WebCore/platform/CookiesStrategy.h
Source/WebCore/platform/network/BlobResourceHandle.cpp
Source/WebCore/platform/network/NetworkStorageSession.h [new file with mode: 0644]
Source/WebCore/platform/network/NetworkStorageSessionStub.cpp [moved from Source/WebKit2/WebProcess/WebCoreSupport/mac/WebPlatformStrategiesMac.mm with 65% similarity]
Source/WebCore/platform/network/NetworkingContext.h
Source/WebCore/platform/network/PlatformCookieJar.h
Source/WebCore/platform/network/ResourceHandle.cpp
Source/WebCore/platform/network/ResourceHandle.h
Source/WebCore/platform/network/ResourceHandleInternal.h
Source/WebCore/platform/network/cf/CookieJarCFNet.cpp
Source/WebCore/platform/network/cf/CookieStorageCFNet.cpp
Source/WebCore/platform/network/cf/CookieStorageCFNet.h [deleted file]
Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp [new file with mode: 0644]
Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
Source/WebCore/platform/network/chromium/CookieJarChromium.cpp
Source/WebCore/platform/network/chromium/ResourceHandle.cpp
Source/WebCore/platform/network/curl/CookieJarCurl.cpp
Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp
Source/WebCore/platform/network/mac/CookieJarMac.mm
Source/WebCore/platform/network/mac/CookieStorageMac.mm
Source/WebCore/platform/network/mac/ResourceHandleMac.mm
Source/WebCore/platform/network/qt/CookieJarQt.cpp
Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
Source/WebCore/platform/network/soup/CookieJarSoup.cpp
Source/WebCore/platform/network/soup/DNSSoup.cpp
Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
Source/WebCore/platform/network/win/CookieJarWin.cpp
Source/WebCore/platform/network/win/ResourceHandleWin.cpp
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/PlatformStrategiesEfl.cpp
Source/WebKit/efl/WebCoreSupport/PlatformStrategiesEfl.h
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp
Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.h
Source/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.mm
Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h
Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.cpp
Source/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.h
Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCookieManagerCFNet.cpp
Source/WebKit/win/WebCoreSupport/WebFrameNetworkingContext.cpp
Source/WebKit/win/WebCoreSupport/WebFrameNetworkingContext.h
Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.h
Source/WebKit/win/WebView.cpp
Source/WebKit/wince/ChangeLog
Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp
Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp
Source/WebKit2/NetworkProcess/mac/NetworkProcessMainMac.mm
Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.h
Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm
Source/WebKit2/Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm
Source/WebKit2/UIProcess/Launcher/efl/ProcessLauncherEfl.cpp
Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/Cookies/WebCookieManager.cpp
Source/WebKit2/WebProcess/Downloads/cfnet/DownloadCFNet.cpp
Source/WebKit2/WebProcess/Downloads/efl/DownloadSoupErrorsEfl.cpp
Source/WebKit2/WebProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp
Source/WebKit2/WebProcess/Downloads/mac/DownloadMac.mm
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
Source/WebKit2/WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h
Source/WebKit2/WebProcess/WebPage/WebFrame.cpp
Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp
Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp