[GTK][EFL] Remove deprecated libsoup API usage
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Apr 2013 09:40:15 +0000 (09:40 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Apr 2013 09:40:15 +0000 (09:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=104894

Patch by Manuel Rego Casasnovas <rego@igalia.com> on 2013-04-16
Reviewed by Philippe Normand.

Source/WebCore:

Based on a patch by Claudio Saavedra <csaavedra@igalia.com>.
Remove LIBSOUP_USE_UNSTABLE_REQUEST_API and only include
libsoup/soup.h.

* platform/network/ResourceHandleInternal.h:
* platform/network/soup/GOwnPtrSoup.cpp:
* platform/network/soup/ProxyResolverSoup.h:
* platform/network/soup/ResourceErrorSoup.cpp:
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ensureSessionIsInitialized): No need to add the requester
feature.
(WebCore::createSoupRequestAndMessageForHandle): SoupSession has a
requester API, use it.

Source/WebKit/efl:

Remove LIBSOUP_USE_UNSTABLE_REQUEST_API and only include
libsoup/soup.h.

Source/WebKit2:

Remove LIBSOUP_USE_UNSTABLE_REQUEST_API and only include
libsoup/soup.h.

* WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.h:
* WebProcess/efl/WebProcessMainEfl.cpp:
* WebProcess/gtk/WebProcessMainGtk.cpp:
* WebProcess/soup/WebKitSoupRequestGeneric.h:
* WebProcess/soup/WebProcessSoup.cpp:
* WebProcess/soup/WebSoupRequestManager.cpp:
(WebKit::WebSoupRequestManager::registerURIScheme): Remove requester and
use method soup_session_add_feature_by_type().

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

17 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/network/ResourceHandleInternal.h
Source/WebCore/platform/network/soup/GOwnPtrSoup.cpp
Source/WebCore/platform/network/soup/ProxyResolverSoup.h
Source/WebCore/platform/network/soup/ResourceErrorSoup.cpp
Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/ewk/ewk_network.h
Source/WebKit/efl/ewk/ewk_view.cpp
Source/WebKit/efl/ewk/ewk_view.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.h
Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp
Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp
Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.h
Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp
Source/WebKit2/WebProcess/soup/WebSoupRequestManager.cpp

index 3d8e0d9..e0afb1f 100644 (file)
@@ -1,3 +1,24 @@
+2013-04-16  Manuel Rego Casasnovas  <rego@igalia.com>
+
+        [GTK][EFL] Remove deprecated libsoup API usage
+        https://bugs.webkit.org/show_bug.cgi?id=104894
+
+        Reviewed by Philippe Normand.
+
+        Based on a patch by Claudio Saavedra <csaavedra@igalia.com>.
+        Remove LIBSOUP_USE_UNSTABLE_REQUEST_API and only include
+        libsoup/soup.h.
+
+        * platform/network/ResourceHandleInternal.h:
+        * platform/network/soup/GOwnPtrSoup.cpp:
+        * platform/network/soup/ProxyResolverSoup.h:
+        * platform/network/soup/ResourceErrorSoup.cpp:
+        * platform/network/soup/ResourceHandleSoup.cpp:
+        (WebCore::ensureSessionIsInitialized): No need to add the requester
+        feature.
+        (WebCore::createSoupRequestAndMessageForHandle): SoupSession has a
+        requester API, use it.
+
 2013-04-15  Maciej Stachowiak  <mjs@apple.com>
 
         Remove more traces of the now-obsolete support for V8
index e8c4eeb..595f517 100644 (file)
@@ -47,9 +47,6 @@
 #endif
 
 #if USE(SOUP)
-#define LIBSOUP_USE_UNSTABLE_REQUEST_API
-#include <libsoup/soup-multipart-input-stream.h>
-#include <libsoup/soup-request.h>
 #include <libsoup/soup.h>
 #include <wtf/gobject/GRefPtr.h>
 class Frame;
index 47080ec..1acba0a 100644 (file)
@@ -20,8 +20,7 @@
 #include "config.h"
 #include "GOwnPtrSoup.h"
 
-#include <libsoup/soup-cookie.h>
-#include <libsoup/soup-uri.h>
+#include <libsoup/soup.h>
 
 namespace WTF {
 
index 60bd1ba..1fded53 100644 (file)
@@ -26,8 +26,7 @@
 #ifndef ProxyResolverSoup_h
 #define ProxyResolverSoup_h
 
-#include <libsoup/soup-proxy-uri-resolver.h>
-#include <libsoup/soup-uri.h>
+#include <libsoup/soup.h>
 
 G_BEGIN_DECLS
 
index 31cc5a6..3e2b230 100644 (file)
@@ -27,8 +27,6 @@
 #include "ResourceError.h"
 
 #include "LocalizedStrings.h"
-#define LIBSOUP_USE_UNSTABLE_REQUEST_API
-#include <libsoup/soup-request.h>
 #include <libsoup/soup.h>
 #include <wtf/gobject/GOwnPtr.h>
 #include <wtf/text/CString.h>
index 4ff3a6e..eb1549a 100644 (file)
 #include <fcntl.h>
 #include <gio/gio.h>
 #include <glib.h>
-#define LIBSOUP_USE_UNSTABLE_REQUEST_API
-#include <libsoup/soup-multipart-input-stream.h>
-#include <libsoup/soup-request-http.h>
-#include <libsoup/soup-requester.h>
 #include <libsoup/soup.h>
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -289,12 +285,6 @@ static void ensureSessionIsInitialized(SoupSession* session)
     }
 #endif // !LOG_DISABLED
 
-    if (!soup_session_get_feature(session, SOUP_TYPE_REQUESTER)) {
-        SoupRequester* requester = soup_requester_new();
-        soup_session_add_feature(session, SOUP_SESSION_FEATURE(requester));
-        g_object_unref(requester);
-    }
-
     g_object_set_data(G_OBJECT(session), "webkit-init", reinterpret_cast<void*>(0xdeadbeef));
 }
 
@@ -985,7 +975,6 @@ static bool createSoupMessageForHandleAndRequest(ResourceHandle* handle, const R
 static bool createSoupRequestAndMessageForHandle(ResourceHandle* handle, const ResourceRequest& request, bool isHTTPFamilyRequest)
 {
     ResourceHandleInternal* d = handle->getInternal();
-    SoupRequester* requester = SOUP_REQUESTER(soup_session_get_feature(d->soupSession(), SOUP_TYPE_REQUESTER));
 
     GOwnPtr<GError> error;
 
@@ -993,7 +982,7 @@ static bool createSoupRequestAndMessageForHandle(ResourceHandle* handle, const R
     if (!soupURI)
         return false;
 
-    d->m_soupRequest = adoptGRef(soup_requester_request_uri(requester, soupURI.get(), &error.outPtr()));
+    d->m_soupRequest = adoptGRef(soup_session_request_uri(d->soupSession(), soupURI.get(), &error.outPtr()));
     if (error) {
         d->m_soupRequest.clear();
         return false;
index 3a29b2e..1735e8c 100644 (file)
@@ -1,3 +1,13 @@
+2013-04-16  Manuel Rego Casasnovas  <rego@igalia.com>
+
+        [GTK][EFL] Remove deprecated libsoup API usage
+        https://bugs.webkit.org/show_bug.cgi?id=104894
+
+        Reviewed by Philippe Normand.
+
+        Remove LIBSOUP_USE_UNSTABLE_REQUEST_API and only include
+        libsoup/soup.h.
+
 2013-04-14  Christophe Dumez  <ch.dumez@sisa.samsung.com>
 
         Unreviewed build fix for WebKit1 EFL after r148373 due to missing
index 3f1ea39..d5c5a9f 100644 (file)
@@ -26,7 +26,7 @@
 #define ewk_network_h
 
 #include <Eina.h>
-#include <libsoup/soup-session.h>
+#include <libsoup/soup.h>
 
 #ifdef __cplusplus
 extern "C" {
index cc40f43..cfaa44f 100644 (file)
@@ -81,7 +81,7 @@
 #include <Evas.h>
 #include <eina_safety_checks.h>
 #include <inttypes.h>
-#include <libsoup/soup-session.h>
+#include <libsoup/soup.h>
 #include <limits>
 #include <math.h>
 #include <sys/time.h>
index 65dc55e..9dea8f5 100644 (file)
 
 #include <Evas.h>
 #include <cairo.h>
-#include <libsoup/soup-session.h>
+#include <libsoup/soup.h>
 
 #ifdef __cplusplus
 extern "C" {
index 8f8e18f..9290686 100644 (file)
@@ -1,3 +1,22 @@
+2013-04-16  Manuel Rego Casasnovas  <rego@igalia.com>
+
+        [GTK][EFL] Remove deprecated libsoup API usage
+        https://bugs.webkit.org/show_bug.cgi?id=104894
+
+        Reviewed by Philippe Normand.
+
+        Remove LIBSOUP_USE_UNSTABLE_REQUEST_API and only include
+        libsoup/soup.h.
+
+        * WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.h:
+        * WebProcess/efl/WebProcessMainEfl.cpp:
+        * WebProcess/gtk/WebProcessMainGtk.cpp:
+        * WebProcess/soup/WebKitSoupRequestGeneric.h:
+        * WebProcess/soup/WebProcessSoup.cpp:
+        * WebProcess/soup/WebSoupRequestManager.cpp:
+        (WebKit::WebSoupRequestManager::registerURIScheme): Remove requester and
+        use method soup_session_add_feature_by_type().
+
 2013-04-15  Dean Jackson  <dino@apple.com>
 
         Plugins that resize might need to be snapshotted.
index 86a0904..14edec9 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef WebKitSoupCookieJarSqlite_h
 #define WebKitSoupCookieJarSqlite_h
 
-#include <libsoup/soup-cookie-jar.h>
+#include <libsoup/soup.h>
 #include <wtf/text/WTFString.h>
 
 G_BEGIN_DECLS
index b54f9db..0fbe4ec 100644 (file)
@@ -26,8 +26,6 @@
 #include "config.h"
 #include "WebProcessMainEfl.h"
 
-#define LIBSOUP_USE_UNSTABLE_REQUEST_API
-
 #include "ProxyResolverSoup.h"
 #include "WKBase.h"
 #include <Ecore.h>
@@ -39,7 +37,7 @@
 #include <WebCore/ResourceHandle.h>
 #include <WebCore/RunLoop.h>
 #include <WebKit2/WebProcess.h>
-#include <libsoup/soup-cache.h>
+#include <libsoup/soup.h>
 #include <runtime/InitializeThreading.h>
 #include <runtime/Operations.h>
 #include <unistd.h>
index 726e9dd..5a95dd6 100644 (file)
@@ -27,8 +27,6 @@
 #include "config.h"
 #include "WebProcessMainGtk.h"
 
-#define LIBSOUP_USE_UNSTABLE_REQUEST_API
-
 #include "WKBase.h"
 #include <WebCore/AuthenticationChallenge.h>
 #include <WebCore/NetworkingContext.h>
@@ -37,7 +35,7 @@
 #include <WebKit2/WebProcess.h>
 #include <gtk/gtk.h>
 #include <libintl.h>
-#include <libsoup/soup-cache.h>
+#include <libsoup/soup.h>
 #include <runtime/InitializeThreading.h>
 #include <unistd.h>
 #include <wtf/MainThread.h>
index cee286c..6212ce6 100644 (file)
@@ -21,8 +21,7 @@
 #define WebKitSoupRequestGeneric_h
 
 #include <glib-object.h>
-#define LIBSOUP_USE_UNSTABLE_REQUEST_API
-#include <libsoup/soup-request.h>
+#include <libsoup/soup.h>
 
 G_BEGIN_DECLS
 
index f1832f9..704bbad 100644 (file)
@@ -27,8 +27,6 @@
 #include "config.h"
 #include "WebProcess.h"
 
-#define LIBSOUP_USE_UNSTABLE_REQUEST_API
-
 #if PLATFORM(EFL)
 #include "SeccompFiltersWebProcessEfl.h"
 #endif
@@ -40,7 +38,6 @@
 #include <WebCore/MemoryCache.h>
 #include <WebCore/PageCache.h>
 #include <WebCore/ResourceHandle.h>
-#include <libsoup/soup-cache.h>
 #include <libsoup/soup.h>
 #include <wtf/gobject/GOwnPtr.h>
 #include <wtf/gobject/GRefPtr.h>
index 41e84d3..e1148ad 100644 (file)
@@ -30,7 +30,6 @@
 #include "WebSoupRequestManagerProxyMessages.h"
 #include <WebCore/ResourceHandle.h>
 #include <WebCore/ResourceRequest.h>
-#include <libsoup/soup-requester.h>
 #include <wtf/gobject/GOwnPtr.h>
 #include <wtf/text/CString.h>
 
@@ -95,16 +94,9 @@ void WebSoupRequestManager::registerURIScheme(const String& scheme)
     g_ptr_array_add(m_schemes.get(), 0);
 
     SoupSession* session = WebCore::ResourceHandle::defaultSession();
-    GRefPtr<SoupRequester> requester = SOUP_REQUESTER(soup_session_get_feature(session, SOUP_TYPE_REQUESTER));
-    if (requester)
-        soup_session_feature_remove_feature(SOUP_SESSION_FEATURE(requester.get()), WEBKIT_TYPE_SOUP_REQUEST_GENERIC);
-    else {
-        requester = adoptGRef(soup_requester_new());
-        soup_session_add_feature(session, SOUP_SESSION_FEATURE(requester.get()));
-    }
     SoupRequestClass* genericRequestClass = static_cast<SoupRequestClass*>(g_type_class_ref(WEBKIT_TYPE_SOUP_REQUEST_GENERIC));
     genericRequestClass->schemes = const_cast<const char**>(reinterpret_cast<char**>(m_schemes->pdata));
-    soup_session_feature_add_feature(SOUP_SESSION_FEATURE(requester.get()), WEBKIT_TYPE_SOUP_REQUEST_GENERIC);
+    soup_session_add_feature_by_type(session, WEBKIT_TYPE_SOUP_REQUEST_GENERIC);
 }
 
 void WebSoupRequestManager::didHandleURIRequest(const CoreIPC::DataReference& requestData, uint64_t contentLength, const String& mimeType, uint64_t requestID)