⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 185819 in webkit


Ignore:
Timestamp:
Jun 22, 2015, 12:57:58 AM (11 years ago)
Author:
Carlos Garcia Campos
Message:

Unreviewed. Fix GTK+ build after r185818.

Actually rollout r185320.

  • platform/network/soup/DNSSoup.cpp:

(WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
(WebCore::DNSResolveQueue::platformResolve):
(WebCore::gotProxySettingsCallback): Deleted.
(WebCore::DNSResolveQueue::platformMaybeResolveHost): Deleted.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r185818 r185819  
     12015-06-22  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        Unreviewed. Fix GTK+ build after r185818.
     4
     5        Actually rollout r185320.
     6
     7        * platform/network/soup/DNSSoup.cpp:
     8        (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
     9        (WebCore::DNSResolveQueue::platformResolve):
     10        (WebCore::gotProxySettingsCallback): Deleted.
     11        (WebCore::DNSResolveQueue::platformMaybeResolveHost): Deleted.
     12
    1132015-06-16  Gavin Barraclough  <barraclough@apple.com>
    214
  • trunk/Source/WebCore/platform/network/soup/DNSSoup.cpp

    r185818 r185819  
    3434#include <libsoup/soup.h>
    3535#include <wtf/MainThread.h>
    36 #include <wtf/glib/GRefPtr.h>
    37 #include <wtf/glib/GUniquePtr.h>
    3836#include <wtf/text/CString.h>
    3937
    4038namespace WebCore {
    4139
    42 static void gotProxySettingsCallback(GObject* sourceObject, GAsyncResult* result, void* userData)
     40// There is no current reliable way to know if we're behind a proxy at
     41// this level. We'll have to implement it in
     42// SoupSession/SoupProxyURIResolver/GProxyResolver
     43bool DNSResolveQueue::platformProxyIsEnabledInSystemPreferences()
    4344{
    44     GProxyResolver* resolver = G_PROXY_RESOLVER(sourceObject);
    45     GUniquePtr<char> hostname(static_cast<char*>(userData));
    46     GUniqueOutPtr<GError> error;
    47 
    48     GUniquePtr<char*> uris(g_proxy_resolver_lookup_finish(resolver, result, &error.outPtr()));
    49     if (error) {
    50         WTFLogAlways("Error determining proxy to use for %s: %s", hostname.get(), error->message);
    51         return;
    52     }
    53 
    54     // We have a list of possible proxies to use for the URI. If the first item in the list is
    55     // direct:// (the usual case), then the user prefers not to use a proxy. This is similar to
    56     // resolving hostnames: there could be many possibilities returned in order of preference, and
    57     // if we're trying to connect we should attempt each one in order, but here we are not trying
    58     // to connect, merely to decide whether a proxy "should" be used.
    59     if (uris && *uris.get() && !strcmp(*uris.get(), "direct://")) {
    60         soup_session_prefetch_dns(SoupNetworkSession::defaultSession().soupSession(), hostname.get(), nullptr, [](SoupAddress*, guint, void*) {
    61             DNSResolveQueue::singleton().decrementRequestCount();
    62         }, nullptr);
    63     }
     45    return false;
    6446}
    6547
    66 void DNSResolveQueue::platformMaybeResolveHost(const String& hostname)
     48static void resolvedCallback(SoupAddress*, guint, void*)
     49{
     50    DNSResolveQueue::singleton().decrementRequestCount();
     51}
     52
     53void DNSResolveQueue::platformResolve(const String& hostname)
    6754{
    6855    ASSERT(isMainThread());
    6956
    70     GRefPtr<GProxyResolver> resolver;
    71     g_object_get(SoupNetworkSession::defaultSession().soupSession(), "proxy-resolver", &resolver.outPtr(), nullptr);
    72     ASSERT_WITH_SECURITY_IMPLICATION(resolver);
    73 
    74     char* uri = g_strdup(hostname.utf8().data()); // Freed by gotProxySettingsCallback.
    75     g_proxy_resolver_lookup_async(resolver.get(), uri, nullptr, gotProxySettingsCallback, uri);
     57    soup_session_prefetch_dns(SoupNetworkSession::defaultSession().soupSession(), hostname.utf8().data(), nullptr, resolvedCallback, nullptr);
    7658}
    7759
Note: See TracChangeset for help on using the changeset viewer.