Changeset 228567 in webkit
- Timestamp:
- Feb 16, 2018 11:34:12 AM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r228564 r228567 1 2018-02-16 Yousuke Kimoto <yousuke.kimoto@sony.com> 2 3 [WinCario] Add NetworkSessionCurl 4 https://bugs.webkit.org/show_bug.cgi?id=182680 5 6 Reviewed by Konstantin Tokarev. 7 8 * NetworkProcess/NetworkSession.cpp: 9 (WebKit::NetworkSession::create): 10 * PlatformWin.cmake: 11 1 12 2018-02-16 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp
r227364 r228567 38 38 #include "NetworkSessionSoup.h" 39 39 #endif 40 #if USE(CURL) 41 #include "NetworkSessionCurl.h" 42 #endif 40 43 41 44 … … 51 54 #if USE(SOUP) 52 55 return NetworkSessionSoup::create(WTFMove(parameters)); 56 #endif 57 #if USE(CURL) 58 return NetworkSessionCurl::create(WTFMove(parameters)); 53 59 #endif 54 60 } -
trunk/Source/WebKit/NetworkProcess/curl/NetworkSessionCurl.cpp
r228566 r228567 1 1 /* 2 * Copyright (C) 201 5 Apple Inc. All rights reserved.2 * Copyright (C) 2018 Sony Interactive Entertainment Inc. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 25 25 26 26 #include "config.h" 27 #include "NetworkSession .h"27 #include "NetworkSessionCurl.h" 28 28 29 #include "NetworkDataTask.h" 30 #include <WebCore/NetworkStorageSession.h> 31 #include <wtf/MainThread.h> 32 #include <wtf/RunLoop.h> 33 34 #if PLATFORM(COCOA) 35 #include "NetworkSessionCocoa.h" 36 #endif 37 #if USE(SOUP) 38 #include "NetworkSessionSoup.h" 39 #endif 40 29 #include "NetworkSessionCreationParameters.h" 41 30 42 31 using namespace WebCore; … … 44 33 namespace WebKit { 45 34 46 Ref<NetworkSession> NetworkSession::create(NetworkSessionCreationParameters&& parameters) 35 NetworkSessionCurl::NetworkSessionCurl(NetworkSessionCreationParameters&& parameters) 36 : NetworkSession(parameters.sessionID) 47 37 { 48 #if PLATFORM(COCOA) 49 return NetworkSessionCocoa::create(WTFMove(parameters)); 50 #endif 51 #if USE(SOUP) 52 return NetworkSessionSoup::create(WTFMove(parameters)); 53 #endif 38 54 39 } 55 40 56 NetworkS torageSession& NetworkSession::networkStorageSession() const41 NetworkSessionCurl::~NetworkSessionCurl() 57 42 { 58 auto* storageSession = NetworkStorageSession::storageSession(m_sessionID);59 RELEASE_ASSERT(storageSession);60 return *storageSession;61 }62 43 63 NetworkSession::NetworkSession(PAL::SessionID sessionID)64 : m_sessionID(sessionID)65 {66 }67 68 NetworkSession::~NetworkSession()69 {70 }71 72 void NetworkSession::invalidateAndCancel()73 {74 for (auto* task : m_dataTaskSet)75 task->invalidateAndCancel();76 }77 78 bool NetworkSession::allowsSpecificHTTPSCertificateForHost(const WebCore::AuthenticationChallenge& challenge)79 {80 #if PLATFORM(COCOA)81 return NetworkSessionCocoa::allowsSpecificHTTPSCertificateForHost(challenge);82 #else83 return false;84 #endif85 44 } 86 45 -
trunk/Source/WebKit/NetworkProcess/curl/NetworkSessionCurl.h
r228566 r228567 1 1 /* 2 * Copyright (C) 201 5 Apple Inc. All rights reserved.2 * Copyright (C) 2018 Sony Interactive Entertainment Inc. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #include "config.h" 26 #pragma once 27 27 28 #include "NetworkSession.h" 28 29 #include "NetworkDataTask.h"30 #include <WebCore/NetworkStorageSession.h>31 #include <wtf/MainThread.h>32 #include <wtf/RunLoop.h>33 34 #if PLATFORM(COCOA)35 #include "NetworkSessionCocoa.h"36 #endif37 #if USE(SOUP)38 #include "NetworkSessionSoup.h"39 #endif40 41 42 using namespace WebCore;43 29 44 30 namespace WebKit { 45 31 46 Ref<NetworkSession> NetworkSession::create(NetworkSessionCreationParameters&& parameters) 47 { 48 #if PLATFORM(COCOA) 49 return NetworkSessionCocoa::create(WTFMove(parameters)); 50 #endif 51 #if USE(SOUP) 52 return NetworkSessionSoup::create(WTFMove(parameters)); 53 #endif 54 } 32 struct NetworkSessionCreationParameters; 55 33 56 NetworkStorageSession& NetworkSession::networkStorageSession() const 57 { 58 auto* storageSession = NetworkStorageSession::storageSession(m_sessionID); 59 RELEASE_ASSERT(storageSession); 60 return *storageSession; 61 } 34 class NetworkSessionCurl final : public NetworkSession { 35 public: 36 static Ref<NetworkSession> create(NetworkSessionCreationParameters&& parameters) 37 { 38 return adoptRef(*new NetworkSessionCurl(WTFMove(parameters))); 39 } 40 ~NetworkSessionCurl(); 62 41 63 NetworkSession::NetworkSession(PAL::SessionID sessionID) 64 : m_sessionID(sessionID) 65 { 66 } 67 68 NetworkSession::~NetworkSession() 69 { 70 } 71 72 void NetworkSession::invalidateAndCancel() 73 { 74 for (auto* task : m_dataTaskSet) 75 task->invalidateAndCancel(); 76 } 77 78 bool NetworkSession::allowsSpecificHTTPSCertificateForHost(const WebCore::AuthenticationChallenge& challenge) 79 { 80 #if PLATFORM(COCOA) 81 return NetworkSessionCocoa::allowsSpecificHTTPSCertificateForHost(challenge); 82 #else 83 return false; 84 #endif 85 } 42 private: 43 NetworkSessionCurl(NetworkSessionCreationParameters&&); 44 }; 86 45 87 46 } // namespace WebKit -
trunk/Source/WebKit/PlatformWin.cmake
r228369 r228567 125 125 126 126 list(APPEND WebKit_INCLUDE_DIRECTORIES 127 "${WEBKIT_DIR}/UIProcess/WebCoreSupport/curl" 127 "${WEBKIT_DIR}/NetworkProcess/curl" 128 "${WEBKIT_DIR}/WebProcess/WebCoreSupport/curl" 128 129 ) 129 130
Note: See TracChangeset
for help on using the changeset viewer.