Changeset 141749 in webkit
- Timestamp:
- Feb 4, 2013 1:33:30 AM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 1 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r141733 r141749 2060 2060 platform/network/MIMEHeader.cpp 2061 2061 platform/network/NetworkStateNotifier.cpp 2062 platform/network/NetworkStorageSessionStub.cpp2063 2062 platform/network/ParsedContentType.cpp 2064 2063 platform/network/ProtectionSpace.cpp -
trunk/Source/WebCore/ChangeLog
r141747 r141749 1 2013-02-04 Balazs Kelemen <kbalazs@webkit.org> 2 3 [Soup] Wrap SoupSession by NetworkStorageSession 4 https://bugs.webkit.org/show_bug.cgi?id=108615 5 6 Reviewed by Alexey Proskuryakov. 7 8 Implement NetworkStorageSession for ports using soup. It has been 9 separated from NetworkingContext, so now we have a default storage 10 session, which is the same as before but now wrapped with NetworkStorageSession, 11 and it can be overridden by the networking context. 12 13 No change in behavior so no new tests. 14 15 * CMakeLists.txt: 16 * GNUmakefile.list.am: 17 * PlatformBlackBerry.cmake: 18 * PlatformEfl.cmake: 19 * loader/CookieJar.cpp: 20 (WebCore): 21 Now we also get the storage session from the networking context 22 and not the other way. 23 24 * platform/network/NetworkStorageSession.h: 25 (NetworkStorageSession): 26 (WebCore::NetworkStorageSession::setSoupSession): 27 (WebCore::NetworkStorageSession::soupSession): 28 Hold a SoupSession pointer for ports using soup. Added a setter because it is 29 necessary for API's that allow it to be specified per page, like EFL WK1. 30 31 * platform/network/NetworkingContext.h: 32 (NetworkingContext): 33 * platform/network/soup/CookieJarSoup.cpp: 34 (WebCore::cookieJarForSession): 35 * platform/network/soup/NetworkStorageSessionSoup.cpp: Copied from Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp. 36 (WebCore::NetworkStorageSession::NetworkStorageSession): 37 (WebCore::NetworkStorageSession::defaultStorageSession): 38 (WebCore::NetworkStorageSession::createDefaultSession): 39 (WebCore::NetworkStorageSession::createPrivateBrowsingSession): 40 (WebCore::NetworkStorageSession::switchToNewTestingSession): 41 * platform/network/soup/ResourceHandleSoup.cpp: 42 (WebCore::sessionFromContext): 43 44 * CMakeLists.txt: 45 * GNUmakefile.list.am: 46 * PlatformBlackBerry.cmake: 47 * PlatformEfl.cmake: 48 * loader/CookieJar.cpp: 49 (WebCore): 50 * platform/network/NetworkStorageSession.h: 51 (NetworkStorageSession): 52 (WebCore::NetworkStorageSession::setSoupSession): 53 (WebCore::NetworkStorageSession::soupSession): 54 * platform/network/NetworkingContext.h: 55 (NetworkingContext): 56 * platform/network/soup/CookieJarSoup.cpp: 57 (WebCore::cookieJarForSession): 58 * platform/network/soup/ResourceHandleSoup.cpp: 59 (WebCore::sessionFromContext): 60 1 61 2013-02-04 Andrey Lushnikov <lushnikov@chromium.org> 2 62 -
trunk/Source/WebCore/GNUmakefile.list.am
r141735 r141749 5817 5817 Source/WebCore/platform/network/NetworkStateNotifier.h \ 5818 5818 Source/WebCore/platform/network/NetworkStorageSession.h \ 5819 Source/WebCore/platform/network/NetworkStorageSessionStub.cpp \5820 5819 Source/WebCore/platform/network/ParsedContentType.cpp \ 5821 5820 Source/WebCore/platform/network/ParsedContentType.h \ … … 5855 5854 Source/WebCore/platform/network/soup/GOwnPtrSoup.cpp \ 5856 5855 Source/WebCore/platform/network/soup/GOwnPtrSoup.h \ 5856 Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp \ 5857 5857 Source/WebCore/platform/network/soup/ProxyServerSoup.cpp \ 5858 5858 Source/WebCore/platform/network/soup/ResourceError.h \ -
trunk/Source/WebCore/PlatformBlackBerry.cmake
r137514 r141749 87 87 list(APPEND WebCore_SOURCES 88 88 platform/network/MIMESniffing.cpp 89 platform/network/NetworkStorageSessionStub.cpp 89 90 platform/network/ProxyServer.cpp 90 91 platform/network/blackberry/AutofillBackingStore.cpp -
trunk/Source/WebCore/PlatformEfl.cmake
r141291 r141749 151 151 platform/network/soup/DNSSoup.cpp 152 152 platform/network/soup/GOwnPtrSoup.cpp 153 platform/network/soup/NetworkStorageSessionSoup.cpp 153 154 platform/network/soup/ProxyResolverSoup.cpp 154 155 platform/network/soup/ProxyServerSoup.cpp -
trunk/Source/WebCore/loader/CookieJar.cpp
r138421 r141749 57 57 } 58 58 59 #if PLATFORM(MAC) || USE(CFNETWORK) 59 #if PLATFORM(MAC) || USE(CFNETWORK) || USE(SOUP) 60 60 inline NetworkStorageSession& storageSession(const Document* document) 61 61 { -
trunk/Source/WebCore/platform/network/NetworkStorageSession.h
r138476 r141749 33 33 typedef const struct __CFURLStorageSession* CFURLStorageSessionRef; 34 34 typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef; 35 #elif USE(SOUP) 36 typedef struct _SoupCookieJar SoupCookieJar; 37 typedef struct _SoupSession SoupSession; 35 38 #endif 36 39 … … 43 46 public: 44 47 static NetworkStorageSession& defaultStorageSession(); 45 static PassOwnPtr<NetworkStorageSession> createDefaultSession(const String& identifierBase );48 static PassOwnPtr<NetworkStorageSession> createDefaultSession(const String& identifierBase = String()); 46 49 static PassOwnPtr<NetworkStorageSession> createPrivateBrowsingSession(const String& identifierBase); 47 50 … … 53 56 RetainPtr<CFHTTPCookieStorageRef> cookieStorage() const; 54 57 bool isPrivateBrowsingSession() const { return m_isPrivate; } 58 #elif USE(SOUP) 59 void setSoupSession(SoupSession* session) { m_session = session; } 60 SoupSession* soupSession() const { return m_session; } 55 61 #else 56 62 NetworkStorageSession(NetworkingContext*); … … 65 71 RetainPtr<CFURLStorageSessionRef> m_platformSession; 66 72 bool m_isPrivate; 73 #elif USE(SOUP) 74 NetworkStorageSession(SoupSession*); 75 SoupSession* m_session; 67 76 #else 68 77 RefPtr<NetworkingContext> m_context; -
trunk/Source/WebCore/platform/network/NetworkingContext.h
r138413 r141749 79 79 #endif 80 80 81 #if PLATFORM(MAC) || USE(CFNETWORK) 82 81 #if PLATFORM(MAC) || USE(CFNETWORK) || USE(SOUP) 83 82 virtual NetworkStorageSession& storageSession() const = 0; 84 83 #endif … … 99 98 100 99 #if USE(SOUP) 101 // FIXME: Wrap SoupSession into a NetworkStorageSession to make the code cross-platform.102 virtual SoupSession* soupSession() const = 0;103 100 virtual uint64_t initiatingPageID() const = 0; 104 101 #endif -
trunk/Source/WebCore/platform/network/soup/CookieJarSoup.cpp
r138413 r141749 35 35 static SoupCookieJar* cookieJarForSession(const NetworkStorageSession& session) 36 36 { 37 if (!session. context())37 if (!session.soupSession()) 38 38 return soupCookieJar(); 39 return SOUP_COOKIE_JAR(soup_session_get_feature(session. context()->soupSession(), SOUP_TYPE_COOKIE_JAR));39 return SOUP_COOKIE_JAR(soup_session_get_feature(session.soupSession(), SOUP_TYPE_COOKIE_JAR)); 40 40 } 41 41 -
trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
r141727 r141749 259 259 static SoupSession* sessionFromContext(NetworkingContext* context) 260 260 { 261 return (context && context->isValid()) ? context->soupSession() : ResourceHandle::defaultSession(); 261 if (!context || !context->isValid()) 262 return ResourceHandle::defaultSession(); 263 return context->storageSession().soupSession(); 262 264 } 263 265 -
trunk/Source/WebKit/efl/ChangeLog
r141736 r141749 1 2013-02-04 Balazs Kelemen <kbalazs@webkit.org> 2 3 [Soup] Wrap SoupSession by NetworkStorageSession 4 https://bugs.webkit.org/show_bug.cgi?id=108615 5 6 Reviewed by Alexey Proskuryakov. 7 8 Changed to hold the SoupSession pointer in a NetworkStorageSession 9 so we can pass it to WebCore. _Ewk_View_Private_Data has to be 10 changed for that reason. 11 12 * WebCoreSupport/FrameNetworkingContextEfl.cpp: 13 (WebCore::FrameNetworkingContextEfl::storageSession): 14 * WebCoreSupport/FrameNetworkingContextEfl.h: 15 (FrameNetworkingContextEfl): 16 * ewk/ewk_view.cpp: 17 (_Ewk_View_Private_Data): 18 (_ewk_view_priv_new): 19 (ewk_view_soup_session_get): 20 (ewk_view_soup_session_set): 21 (EWKPrivate::storageSession): 22 (EWKPrivate): 23 * ewk/ewk_view_private.h: 24 (EWKPrivate): 25 1 26 2013-02-03 KwangYong Choi <ky0.choi@samsung.com> 2 27 -
trunk/Source/WebKit/efl/WebCoreSupport/FrameNetworkingContextEfl.cpp
r130259 r141749 35 35 #include "ewk_frame.h" 36 36 #include "ewk_view.h" 37 #include "ewk_view_private.h" 37 38 38 39 #include <Evas.h> … … 51 52 } 52 53 53 SoupSession* FrameNetworkingContextEfl::soupSession() const54 NetworkStorageSession& FrameNetworkingContextEfl::storageSession() const 54 55 { 55 return ewk_view_soup_session_get(ewk_frame_view_get(m_ewkFrame)); 56 if (NetworkStorageSession* session = EWKPrivate::storageSession(ewk_frame_view_get(m_ewkFrame))) 57 return *session; 58 return NetworkStorageSession::defaultStorageSession(); 56 59 } 57 60 -
trunk/Source/WebKit/efl/WebCoreSupport/FrameNetworkingContextEfl.h
r138326 r141749 39 39 40 40 WebCore::Frame* coreFrame() const { return frame(); } 41 virtual SoupSession* soupSession() const;42 41 virtual uint64_t initiatingPageID() const; 43 42 44 43 private: 44 virtual WebCore::NetworkStorageSession& storageSession() const; 45 45 46 FrameNetworkingContextEfl(Frame*, Evas_Object*); 46 47 -
trunk/Source/WebKit/efl/ewk/ewk_view.cpp
r141040 r141749 50 50 #include "JSDOMWindow.h" 51 51 #include "JSLock.h" 52 #include "NetworkStorageSession.h" 52 53 #include "Operations.h" 53 54 #include "PageClientEfl.h" … … 273 274 OwnPtr<WebCore::NavigatorContentUtilsClientEfl> navigatorContentUtilsClient; 274 275 #endif 276 OwnPtr<WebCore::NetworkStorageSession> storageSession; 275 277 struct { 276 278 Ewk_Menu menu; … … 370 372 Ecore_Animator* animator; 371 373 } animatedZoom; 372 SoupSession* soupSession;373 374 const char* cursorGroup; 374 375 Evas_Object* cursorObject; … … 927 928 priv->history = ewk_history_new(static_cast<WebCore::BackForwardListImpl*>(priv->page->backForwardList())); 928 929 929 priv->s oupSession = WebCore::ResourceHandle::defaultSession();930 priv->storageSession = WebCore::NetworkStorageSession::createDefaultSession(); 930 931 931 932 priv->pageClient = adoptPtr(new PageClientEfl(smartData->self)); … … 4382 4383 EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0); 4383 4384 EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0); 4384 return priv->s oupSession;4385 return priv->storageSession->soupSession(); 4385 4386 } 4386 4387 … … 4394 4395 return; 4395 4396 } 4396 priv->s oupSession = session;4397 priv->storageSession->setSoupSession(session); 4397 4398 } 4398 4399 … … 4852 4853 } 4853 4854 4855 WebCore::NetworkStorageSession* storageSession(const Evas_Object* ewkView) 4856 { 4857 EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0); 4858 EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0); 4859 return priv->storageSession.get(); 4860 } 4861 4854 4862 } // namespace EWKPrivate -
trunk/Source/WebKit/efl/ewk/ewk_view_private.h
r134743 r141749 24 24 25 25 #include "Frame.h" 26 #include "NetworkStorageSession.h" 26 27 #include "Page.h" 27 28 #include "Widget.h" … … 175 176 WebCore::Page *corePage(const Evas_Object *ewkView); 176 177 PlatformPageClient corePageClient(Evas_Object* ewkView); 178 WebCore::NetworkStorageSession* storageSession(const Evas_Object* ewkView); 177 179 } // namespace EWKPrivate 178 180 -
trunk/Source/WebKit/gtk/ChangeLog
r141736 r141749 1 2013-02-04 Balazs Kelemen <kbalazs@webkit.org> 2 3 [Soup] Wrap SoupSession by NetworkStorageSession 4 https://bugs.webkit.org/show_bug.cgi?id=108615 5 6 Reviewed by Alexey Proskuryakov. 7 8 * WebCoreSupport/FrameNetworkingContextGtk.cpp: 9 (WebKit::FrameNetworkingContextGtk::storageSession): 10 * WebCoreSupport/FrameNetworkingContextGtk.h: 11 (FrameNetworkingContextGtk): 12 1 13 2013-02-03 KwangYong Choi <ky0.choi@samsung.com> 2 14 -
trunk/Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.cpp
r130259 r141749 22 22 #include "FrameNetworkingContextGtk.h" 23 23 24 #include "NetworkStorageSession.h" 24 25 #include "NotImplemented.h" 25 #include "ResourceHandle.h"26 26 27 27 using namespace WebCore; … … 29 29 namespace WebKit { 30 30 31 SoupSession* FrameNetworkingContextGtk::soupSession() const31 NetworkStorageSession& FrameNetworkingContextGtk::storageSession() const 32 32 { 33 return ResourceHandle::defaultSession();33 return NetworkStorageSession::defaultStorageSession(); 34 34 } 35 35 -
trunk/Source/WebKit/gtk/WebCoreSupport/FrameNetworkingContextGtk.h
r130259 r141749 33 33 34 34 WebCore::Frame* coreFrame() const { return frame(); } 35 virtual SoupSession* soupSession() const;36 35 virtual uint64_t initiatingPageID() const; 37 36 38 37 private: 38 virtual WebCore::NetworkStorageSession& storageSession() const; 39 39 40 FrameNetworkingContextGtk(WebCore::Frame* frame) 40 41 : WebCore::FrameNetworkingContext(frame) -
trunk/Source/WebKit2/ChangeLog
r141744 r141749 1 2013-02-04 Balazs Kelemen <kbalazs@webkit.org> 2 3 [Soup] Wrap SoupSession by NetworkStorageSession 4 https://bugs.webkit.org/show_bug.cgi?id=108615 5 6 Reviewed by Alexey Proskuryakov. 7 8 * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp: 9 (WebKit::WebFrameNetworkingContext::storageSession): 10 * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h: 11 (WebFrameNetworkingContext): 12 1 13 2013-02-03 David Kilzer <ddkilzer@apple.com> 2 14 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
r130259 r141749 29 29 #include "WebFrame.h" 30 30 #include "WebPage.h" 31 #include <WebCore/ResourceHandle.h>32 31 33 32 using namespace WebCore; … … 43 42 } 44 43 45 SoupSession* WebFrameNetworkingContext::soupSession() const44 NetworkStorageSession& WebFrameNetworkingContext::storageSession() const 46 45 { 47 return ResourceHandle::defaultSession();46 return NetworkStorageSession::defaultStorageSession(); 48 47 } 49 48 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h
r130259 r141749 45 45 WebFrameNetworkingContext(WebFrame*); 46 46 47 virtual SoupSession* soupSession() const;47 virtual WebCore::NetworkStorageSession& storageSession() const; 48 48 virtual uint64_t initiatingPageID() const; 49 49
Note: See TracChangeset
for help on using the changeset viewer.