WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Add basic versions/stubs for Network Process files for wincairo webkit
176069-1.diff (text/plain), 25.43 KB, created by
Stephan Szabo
on 2017-08-30 16:58:41 PDT
(
hide
)
Description:
Add basic versions/stubs for Network Process files for wincairo webkit
Filename:
MIME Type:
Creator:
Stephan Szabo
Created:
2017-08-30 16:58:41 PDT
Size:
25.43 KB
patch
obsolete
>diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index d4f58dd..9cc55b5 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,52 @@ >+2017-08-30 Stephan Szabo <stephan.szabo@am.sony.com> >+ >+ [WinCairo] Add Network Process files for wincairo webkit >+ https://bugs.webkit.org/show_bug.cgi?id=176069 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * NetworkProcess/CustomProtocols/curl/LegacyCustomProtocolManagerCurl.cpp: Added. >+ (WebKit::LegacyCustomProtocolManager::registerProtocolClass): >+ (WebKit::LegacyCustomProtocolManager::registerScheme): >+ (WebKit::LegacyCustomProtocolManager::unregisterScheme): >+ (WebKit::LegacyCustomProtocolManager::supportsScheme): >+ (WebKit::LegacyCustomProtocolManager::didFailWithError): >+ (WebKit::LegacyCustomProtocolManager::didLoadData): >+ (WebKit::LegacyCustomProtocolManager::didReceiveResponse): >+ (WebKit::LegacyCustomProtocolManager::didFinishLoading): >+ (WebKit::LegacyCustomProtocolManager::wasRedirectedToRequest): >+ * NetworkProcess/Downloads/curl/DownloadCurl.cpp: Added. >+ (WebKit::Download::resume): >+ (WebKit::Download::platformDidFinish): >+ (WebKit::Download::startNetworkLoadWithHandle): >+ (WebKit::Download::startNetworkLoad): >+ (WebKit::Download::platformInvalidate): >+ * NetworkProcess/EntryPoint/win/NetworkProcessMain.cpp: Added. >+ (main): >+ * NetworkProcess/curl/NetworkProcessCurl.cpp: Added. >+ (WebKit::NetworkProcess::platformInitializeNetworkProcess): >+ (WebKit::NetworkProcess::platformSetURLCacheSize): >+ (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost): >+ (WebKit::NetworkProcess::clearCacheForAllOrigins): >+ (WebKit::NetworkProcess::clearDiskCache): >+ (WebKit::NetworkProcess::platformTerminate): >+ * NetworkProcess/curl/RemoteNetworkingContextCurl.cpp: Added. >+ (WebKit::RemoteNetworkingContext::~RemoteNetworkingContext): >+ (WebKit::RemoteNetworkingContext::isValid const): >+ (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): >+ (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession): >+ (WebKit::RemoteNetworkingContext::storageSession const): >+ (WebKit::RemoteNetworkingContext::blockedError const): >+ * NetworkProcess/win/NetworkProcessMainWin.cpp: Added. >+ (WebKit::NetworkProcessMainWin): >+ * NetworkProcess/win/NetworkProcessMainWin.h: Added. >+ * NetworkProcess/win/SystemProxyWin.cpp: Added. >+ (WindowsSystemProxy::getSystemHttpProxy): >+ (WindowsSystemProxy::setCurlHttpProxy): >+ (WindowsSystemProxy::parseProxyString): >+ * NetworkProcess/win/SystemProxyWin.h: Added. >+ * PlatformWin.cmake: >+ > 2017-08-28 Andy Estes <aestes@apple.com> > > [Cocoa] Upstream WKGetWebDefaultCFStringEncoding() >diff --git a/Source/WebKit/NetworkProcess/CustomProtocols/curl/LegacyCustomProtocolManagerCurl.cpp b/Source/WebKit/NetworkProcess/CustomProtocols/curl/LegacyCustomProtocolManagerCurl.cpp >new file mode 100644 >index 0000000..172a1d3 >--- /dev/null >+++ b/Source/WebKit/NetworkProcess/CustomProtocols/curl/LegacyCustomProtocolManagerCurl.cpp >@@ -0,0 +1,83 @@ >+/* >+ * Copyright (C) 2017 Sony Interactive Entertainment Inc. >+ * >+ * This library is free software; you can redistribute it and/or >+ * modify it under the terms of the GNU Library General Public >+ * License as published by the Free Software Foundation; either >+ * version 2 of the License, or (at your option) any later version. >+ * >+ * This library is distributed in the hope that it will be useful, >+ * but WITHOUT ANY WARRANTY; without even the implied warranty of >+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+ * Library General Public License for more details. >+ * >+ * You should have received a copy of the GNU Library General Public License >+ * along with this library; see the file COPYING.LIB. If not, write to >+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >+ * Boston, MA 02110-1301, USA. >+ */ >+ >+#include "config.h" >+#include "LegacyCustomProtocolManager.h" >+ >+#include "DataReference.h" >+#include "LegacyCustomProtocolManagerMessages.h" >+#include "NetworkProcess.h" >+#include <WebCore/NetworkStorageSession.h> >+#include <WebCore/NotImplemented.h> >+#include <WebCore/ResourceError.h> >+#include <WebCore/ResourceRequest.h> >+#include <WebCore/ResourceResponse.h> >+#include <wtf/NeverDestroyed.h> >+ >+using namespace WebCore; >+ >+namespace WebKit { >+ >+void LegacyCustomProtocolManager::registerProtocolClass() >+{ >+ notImplemented(); >+} >+ >+void LegacyCustomProtocolManager::registerScheme(const String&) >+{ >+ notImplemented(); >+} >+ >+void LegacyCustomProtocolManager::unregisterScheme(const String&) >+{ >+ notImplemented(); >+} >+ >+bool LegacyCustomProtocolManager::supportsScheme(const String&) >+{ >+ notImplemented(); >+ return false; >+} >+ >+void LegacyCustomProtocolManager::didFailWithError(uint64_t, const ResourceError&) >+{ >+ notImplemented(); >+} >+ >+void LegacyCustomProtocolManager::didLoadData(uint64_t, const IPC::DataReference&) >+{ >+ notImplemented(); >+} >+ >+void LegacyCustomProtocolManager::didReceiveResponse(uint64_t, const ResourceResponse&, uint32_t) >+{ >+ notImplemented(); >+} >+ >+void LegacyCustomProtocolManager::didFinishLoading(uint64_t) >+{ >+ notImplemented(); >+} >+ >+void LegacyCustomProtocolManager::wasRedirectedToRequest(uint64_t, const ResourceRequest&, const ResourceResponse&) >+{ >+ notImplemented(); >+} >+ >+} // namespace WebKit >diff --git a/Source/WebKit/NetworkProcess/Downloads/curl/DownloadCurl.cpp b/Source/WebKit/NetworkProcess/Downloads/curl/DownloadCurl.cpp >new file mode 100644 >index 0000000..bf2f13a >--- /dev/null >+++ b/Source/WebKit/NetworkProcess/Downloads/curl/DownloadCurl.cpp >@@ -0,0 +1,66 @@ >+/* >+* Copyright (C) 2017 Sony Interactive Entertainment Inc. >+* >+* 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 INC. 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 INC. 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 "Download.h" >+ >+#if !USE(NETWORK_SESSION) >+ >+#include "DataReference.h" >+#include "WebPage.h" >+#include <WebCore/NotImplemented.h> >+#include <WebCore/ResourceHandle.h> >+#include <WebCore/ResourceHandleClient.h> >+#include <WebCore/ResourceResponse.h> >+ >+namespace WebKit { >+ >+void Download::resume(const IPC::DataReference&, const String&, const SandboxExtension::Handle&) >+{ >+ notImplemented(); >+} >+ >+void Download::platformDidFinish() >+{ >+ notImplemented(); >+} >+ >+void Download::startNetworkLoadWithHandle(WebCore::ResourceHandle*, const WebCore::ResourceResponse&) >+{ >+ notImplemented(); >+} >+ >+void Download::startNetworkLoad() >+{ >+ notImplemented(); >+} >+ >+void Download::platformInvalidate() >+{ >+ notImplemented(); >+} >+ >+} >+#endif >diff --git a/Source/WebKit/NetworkProcess/EntryPoint/win/NetworkProcessMain.cpp b/Source/WebKit/NetworkProcess/EntryPoint/win/NetworkProcessMain.cpp >new file mode 100644 >index 0000000..fdcf8b7 >--- /dev/null >+++ b/Source/WebKit/NetworkProcess/EntryPoint/win/NetworkProcessMain.cpp >@@ -0,0 +1,34 @@ >+/* >+ * Copyright (C) 2017 Sony Interactive Entertainment Inc. >+ * >+ * 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 INC. 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 INC. 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 "NetworkProcessMainWin.h" >+ >+#include <stdio.h> >+#include <windows.h> >+ >+int main(int argc, char** argv) >+{ >+ WebKit::NetworkProcessMainWin(argc, argv); >+} >diff --git a/Source/WebKit/NetworkProcess/curl/NetworkProcessCurl.cpp b/Source/WebKit/NetworkProcess/curl/NetworkProcessCurl.cpp >new file mode 100644 >index 0000000..69a82a7 >--- /dev/null >+++ b/Source/WebKit/NetworkProcess/curl/NetworkProcessCurl.cpp >@@ -0,0 +1,76 @@ >+/* >+ * Copyright (C) 2017 Sony Interactive Entertainment Inc. >+ * >+ * 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 INC. 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 INC. 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 "NetworkProcess.h" >+ >+#include "NetworkCache.h" >+#include "NetworkProcessCreationParameters.h" >+#include "ResourceCachesToClear.h" >+#include "WebCookieManager.h" >+#include <WebCore/CertificateInfo.h> >+#include <WebCore/FileSystem.h> >+#include <WebCore/NetworkStorageSession.h> >+#include <WebCore/NotImplemented.h> >+#include <WebCore/ResourceHandle.h> >+#include <wtf/RAMSize.h> >+#include <wtf/text/CString.h> >+#include <wtf/text/StringBuilder.h> >+ >+using namespace WebCore; >+ >+namespace WebKit { >+ >+void NetworkProcess::platformInitializeNetworkProcess(const NetworkProcessCreationParameters& parameters) >+{ >+ notImplemented(); >+} >+ >+void NetworkProcess::platformSetURLCacheSize(unsigned, uint64_t) >+{ >+ notImplemented(); >+} >+ >+void NetworkProcess::allowSpecificHTTPSCertificateForHost(const CertificateInfo& certificateInfo, const String& host) >+{ >+ notImplemented(); >+} >+ >+void NetworkProcess::clearCacheForAllOrigins(uint32_t cachesToClear) >+{ >+ notImplemented(); >+} >+ >+void NetworkProcess::clearDiskCache(std::chrono::system_clock::time_point, Function<void()>&&) >+{ >+ notImplemented(); >+} >+ >+void NetworkProcess::platformTerminate() >+{ >+ notImplemented(); >+} >+ >+} // namespace WebKit >diff --git a/Source/WebKit/NetworkProcess/curl/RemoteNetworkingContextCurl.cpp b/Source/WebKit/NetworkProcess/curl/RemoteNetworkingContextCurl.cpp >new file mode 100644 >index 0000000..73f7bfa >--- /dev/null >+++ b/Source/WebKit/NetworkProcess/curl/RemoteNetworkingContextCurl.cpp >@@ -0,0 +1,70 @@ >+/* >+ * Copyright (C) 2017 Sony Interactive Entertainment Inc. >+ * >+ * 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 INC. 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 INC. 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 "RemoteNetworkingContext.h" >+ >+#include "NetworkSession.h" >+#include "SessionTracker.h" >+#include "WebsiteDataStoreParameters.h" >+#include <WebCore/NetworkStorageSession.h> >+#include <WebCore/NotImplemented.h> >+#include <WebCore/ResourceError.h> >+#include <WebCore/ResourceHandle.h> >+ >+using namespace WebCore; >+ >+namespace WebKit { >+ >+RemoteNetworkingContext::~RemoteNetworkingContext() >+{ >+} >+ >+bool RemoteNetworkingContext::isValid() const >+{ >+ return true; >+} >+ >+void RemoteNetworkingContext::ensurePrivateBrowsingSession(WebsiteDataStoreParameters&&) >+{ >+ notImplemented(); >+} >+ >+void RemoteNetworkingContext::ensureWebsiteDataStoreSession(WebsiteDataStoreParameters&&) >+{ >+ notImplemented(); >+} >+ >+NetworkStorageSession& RemoteNetworkingContext::storageSession() const >+{ >+ return NetworkStorageSession::defaultStorageSession(); >+} >+ >+ResourceError RemoteNetworkingContext::blockedError(const ResourceRequest& request) const >+{ >+ return ResourceError(); >+} >+ >+} >diff --git a/Source/WebKit/NetworkProcess/win/NetworkProcessMainWin.cpp b/Source/WebKit/NetworkProcess/win/NetworkProcessMainWin.cpp >new file mode 100644 >index 0000000..dfd3206 >--- /dev/null >+++ b/Source/WebKit/NetworkProcess/win/NetworkProcessMainWin.cpp >@@ -0,0 +1,39 @@ >+/* >+ * Copyright (C) 2017 Sony Interactive Entertainment Inc. >+ * >+ * 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 THE COPYRIGHT HOLDERS ``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 INC. 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 "NetworkProcessMainWin.h" >+ >+#include "ChildProcessMain.h" >+#include "NetworkProcess.h" >+ >+namespace WebKit { >+ >+int NetworkProcessMainWin(int argc, char** argv) >+{ >+ return ChildProcessMain<NetworkProcess, ChildProcessMainBase>(argc, argv); >+} >+ >+} // namespace WebKit >diff --git a/Source/WebKit/NetworkProcess/win/NetworkProcessMainWin.h b/Source/WebKit/NetworkProcess/win/NetworkProcessMainWin.h >new file mode 100644 >index 0000000..c00689d >--- /dev/null >+++ b/Source/WebKit/NetworkProcess/win/NetworkProcessMainWin.h >@@ -0,0 +1,36 @@ >+/* >+ * Copyright (C) 2017 Sony Interactive Entertainment Inc. >+ * >+ * 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 INC. 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 INC. 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. >+ */ >+ >+#pragma once >+ >+#include <WebKit/WKBase.h> >+ >+namespace WebKit { >+ >+extern "C" { >+WK_EXPORT int NetworkProcessMainWin(int argc, char** argv); >+} >+ >+} // namespace WebKit >diff --git a/Source/WebKit/NetworkProcess/win/SystemProxyWin.cpp b/Source/WebKit/NetworkProcess/win/SystemProxyWin.cpp >new file mode 100644 >index 0000000..ff4c11d >--- /dev/null >+++ b/Source/WebKit/NetworkProcess/win/SystemProxyWin.cpp >@@ -0,0 +1,107 @@ >+/* >+ * Copyright (C) 2017 Sony Interactive Entertainment Inc. >+ * >+ * 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 INC. 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 INC. 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 "SystemProxyWin.h" >+ >+#include <WebCore/CurlContext.h> >+ >+bool WindowsSystemProxy::getSystemHttpProxy(char* buffer, int bufferLen, int* port) >+{ >+ bool result = false; >+ TCHAR* tRegBuffer = new TCHAR[bufferLen]; >+ if (!tRegBuffer) >+ return false; >+ TCHAR* tHost = 0; >+ DWORD type; >+ DWORD size; >+ HKEY key; >+ >+ LONG ret = RegOpenKeyEx(HKEY_CURRENT_USER, >+ L"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", >+ 0, >+ KEY_READ, >+ &key); >+ if (ret != ERROR_SUCCESS) >+ goto exitGracefully; >+ >+ size = bufferLen - 1; >+ ret = RegQueryValueEx(key, >+ L"ProxyServer", >+ nullptr, >+ &type, >+ (LPBYTE)tRegBuffer, >+ &size); >+ >+ if (ret != ERROR_SUCCESS) >+ goto exitGracefully; >+ >+ tHost = new TCHAR[bufferLen]; >+ if (!tHost || !parseProxyString(tRegBuffer, tHost, bufferLen, port)) >+ goto exitGracefully; >+ >+ wcstombs(buffer, tHost, bufferLen); >+ result = true; >+ >+exitGracefully: >+ if (tRegBuffer) >+ delete [] tRegBuffer; >+ if (tHost) >+ delete [] tHost; >+ >+ return result; >+} >+ >+void WindowsSystemProxy::setCurlHttpProxy(char* proxy, int port) >+{ >+ WebCore::CurlContext::singleton().setProxyInfo(proxy, port); >+} >+ >+void WindowsSystemProxy::setCurlHttpProxy() >+{ >+ char proxy[ProxyServerNameLength]; >+ int port; >+ if (getSystemHttpProxy(proxy, ProxyServerNameLength, &port)) >+ setCurlHttpProxy(proxy, port); >+} >+ >+bool WindowsSystemProxy::parseProxyString(const TCHAR* regProxyString, TCHAR* hostString, int hostStringLen, int* port) >+{ >+ const TCHAR* found = wcschr(regProxyString, L':'); >+ if (!found) >+ return false; >+ >+ int len = found - regProxyString; >+ if (len >= hostStringLen) >+ return false; >+ >+ wcsncpy(hostString, regProxyString, hostStringLen); >+ hostString[len] = L'\0'; >+ >+ TCHAR* portStr = const_cast<TCHAR*>(found) + 1; >+ *port = _wtoi(portStr); >+ >+ return true; >+} >diff --git a/Source/WebKit/NetworkProcess/win/SystemProxyWin.h b/Source/WebKit/NetworkProcess/win/SystemProxyWin.h >new file mode 100644 >index 0000000..dad93b9 >--- /dev/null >+++ b/Source/WebKit/NetworkProcess/win/SystemProxyWin.h >@@ -0,0 +1,38 @@ >+/* >+ * Copyright (C) 2017 Sony Interactive Entertainment Inc. >+ * >+ * 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 INC. 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 INC. 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. >+ */ >+ >+class WindowsSystemProxy { >+ static const int ProxyServerNameLength = 512; >+public: >+ static bool getSystemHttpProxy(char* buffer, int bufferLen, int* port); >+ static bool getSystemHttpsProxy(char* buffer, int bufferLen, int* port); >+ static bool getSystemFtpProxy(char* buffer, int bufferLen, int* port); >+ >+ static void setCurlHttpProxy(char* proxy, int port); >+ static void setCurlHttpProxy(); >+ >+private: >+ static bool parseProxyString(const TCHAR* regProxyString, TCHAR* hostString, int hostStringLen, int* port); >+}; >diff --git a/Source/WebKit/PlatformWin.cmake b/Source/WebKit/PlatformWin.cmake >index 786a8b5..47b7054 100644 >--- a/Source/WebKit/PlatformWin.cmake >+++ b/Source/WebKit/PlatformWin.cmake >@@ -9,6 +9,15 @@ file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT2_DIR}) > add_definitions(-DBUILDING_WEBKIT) > > list(APPEND WebKit2_SOURCES >+ NetworkProcess/CustomProtocols/curl/LegacyCustomProtocolManagerCurl.cpp >+ >+ NetworkProcess/Downloads/curl/DownloadCurl.cpp >+ >+ NetworkProcess/curl/NetworkProcessCurl.cpp >+ NetworkProcess/curl/RemoteNetworkingContextCurl.cpp >+ >+ NetworkProcess/win/NetworkProcessMainWin.cpp >+ NetworkProcess/win/SystemProxyWin.cpp > ) > > # DerivedSources/JavaScriptCore/inspector/InspectorBackendCommands.js is >@@ -56,6 +65,7 @@ list(APPEND WebProcess_SOURCES > ) > > list(APPEND NetworkProcess_SOURCES >+ NetworkProcess/EntryPoint/win/NetworkProcessMain.cpp > ) > > list(APPEND StorageProcess_SOURCES
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
achristensen
:
review-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 176069
:
319424
|
319612
|
319655
|
319878