Skip to content

Commit

Permalink
Merge r235101 - Use unified build for NetworkProcess
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=185011

Reviewed by Alex Christensen.

* NetworkProcess/Cookies/WebCookieManager.cpp:
* NetworkProcess/Downloads/Download.cpp:
* NetworkProcess/Downloads/DownloadManager.cpp:
* NetworkProcess/Downloads/PendingDownload.cpp:
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
* NetworkProcess/NetworkCORSPreflightChecker.cpp:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
* NetworkProcess/NetworkContentRuleListManager.cpp:
* NetworkProcess/NetworkDataTask.cpp:
* NetworkProcess/NetworkDataTaskBlob.cpp:
* NetworkProcess/NetworkLoadChecker.cpp:
* NetworkProcess/NetworkProcess.cpp:
* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
* NetworkProcess/NetworkResourceLoadParameters.cpp:
* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/NetworkSession.cpp:
* NetworkProcess/NetworkSocketStream.cpp:
* NetworkProcess/PingLoad.cpp:
* NetworkProcess/cache/CacheStorageEngine.cpp:
* NetworkProcess/cache/CacheStorageEngineCache.cpp:
* NetworkProcess/cache/CacheStorageEngineCaches.cpp:
* NetworkProcess/cache/CacheStorageEngineConnection.cpp:
* NetworkProcess/cache/NetworkCache.cpp:
* NetworkProcess/capture/NetworkCaptureEvent.cpp:
* NetworkProcess/capture/NetworkCaptureManager.cpp:
* NetworkProcess/capture/NetworkCaptureRecorder.cpp:
* NetworkProcess/capture/NetworkCaptureReplayer.cpp:
* NetworkProcess/capture/NetworkDataTaskReplay.cpp:
* NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
* NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
(WebKit::Download::platformCancelNetworkLoad):
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]):
(-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]):
Fix the build with unified sources.

* Sources.txt: Un-@no-unify NetworkProcess/*.
* SourcesCocoa.txt: Un-@no-unify NetworkProcess/*.
  • Loading branch information
mcatanzaro authored and carlosgcampos committed Aug 24, 2018
1 parent c9b7577 commit d88c831
Show file tree
Hide file tree
Showing 35 changed files with 184 additions and 131 deletions.
47 changes: 47 additions & 0 deletions Source/WebKit/ChangeLog
@@ -1,3 +1,50 @@
2018-08-20 Michael Catanzaro <mcatanzaro@igalia.com>

Use unified build for NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=185011

Reviewed by Alex Christensen.

* NetworkProcess/Cookies/WebCookieManager.cpp:
* NetworkProcess/Downloads/Download.cpp:
* NetworkProcess/Downloads/DownloadManager.cpp:
* NetworkProcess/Downloads/PendingDownload.cpp:
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
* NetworkProcess/NetworkCORSPreflightChecker.cpp:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
* NetworkProcess/NetworkContentRuleListManager.cpp:
* NetworkProcess/NetworkDataTask.cpp:
* NetworkProcess/NetworkDataTaskBlob.cpp:
* NetworkProcess/NetworkLoadChecker.cpp:
* NetworkProcess/NetworkProcess.cpp:
* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
* NetworkProcess/NetworkResourceLoadParameters.cpp:
* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/NetworkSession.cpp:
* NetworkProcess/NetworkSocketStream.cpp:
* NetworkProcess/PingLoad.cpp:
* NetworkProcess/cache/CacheStorageEngine.cpp:
* NetworkProcess/cache/CacheStorageEngineCache.cpp:
* NetworkProcess/cache/CacheStorageEngineCaches.cpp:
* NetworkProcess/cache/CacheStorageEngineConnection.cpp:
* NetworkProcess/cache/NetworkCache.cpp:
* NetworkProcess/capture/NetworkCaptureEvent.cpp:
* NetworkProcess/capture/NetworkCaptureManager.cpp:
* NetworkProcess/capture/NetworkCaptureRecorder.cpp:
* NetworkProcess/capture/NetworkCaptureReplayer.cpp:
* NetworkProcess/capture/NetworkDataTaskReplay.cpp:
* NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
* NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
(WebKit::Download::platformCancelNetworkLoad):
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]):
(-[WKNetworkSessionDelegate URLSession:dataTask:willCacheResponse:completionHandler:]):
Fix the build with unified sources.

* Sources.txt: Un-@no-unify NetworkProcess/*.
* SourcesCocoa.txt: Un-@no-unify NetworkProcess/*.

2018-08-20 Michael Catanzaro <mcatanzaro@igalia.com>

[CMake] Sync unified build with Cocoa ports
Expand Down
3 changes: 1 addition & 2 deletions Source/WebKit/NetworkProcess/Cookies/WebCookieManager.cpp
Expand Up @@ -38,9 +38,8 @@
#include <wtf/text/StringHash.h>
#include <wtf/text/WTFString.h>

using namespace WebCore;

namespace WebKit {
using namespace WebCore;

const char* WebCookieManager::supplementName()
{
Expand Down
5 changes: 3 additions & 2 deletions Source/WebKit/NetworkProcess/Downloads/Download.cpp
Expand Up @@ -43,11 +43,10 @@
#include "NetworkDataTaskCocoa.h"
#endif

using namespace WebCore;

#define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - Download::" fmt, this, ##__VA_ARGS__)

namespace WebKit {
using namespace WebCore;

Download::Download(DownloadManager& downloadManager, DownloadID downloadID, NetworkDataTask& download, const PAL::SessionID& sessionID, const String& suggestedName)
: m_downloadManager(downloadManager)
Expand Down Expand Up @@ -182,3 +181,5 @@ void Download::platformCancelNetworkLoad()
#endif

} // namespace WebKit

#undef RELEASE_LOG_IF_ALLOWED
3 changes: 1 addition & 2 deletions Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp
Expand Up @@ -36,9 +36,8 @@
#include <pal/SessionID.h>
#include <wtf/StdLibExtras.h>

using namespace WebCore;

namespace WebKit {
using namespace WebCore;

DownloadManager::DownloadManager(Client& client)
: m_client(client)
Expand Down
3 changes: 1 addition & 2 deletions Source/WebKit/NetworkProcess/Downloads/PendingDownload.cpp
Expand Up @@ -32,9 +32,8 @@
#include "NetworkProcess.h"
#include "WebCoreArgumentCoders.h"

using namespace WebCore;

namespace WebKit {
using namespace WebCore;

PendingDownload::PendingDownload(NetworkLoadParameters&& parameters, DownloadID downloadID, NetworkSession& networkSession, const String& suggestedName)
: m_networkLoad(std::make_unique<NetworkLoad>(*this, WTFMove(parameters), networkSession))
Expand Down
Expand Up @@ -62,8 +62,7 @@
void Download::platformCancelNetworkLoad()
{
ASSERT(m_downloadTask);
[m_downloadTask cancelByProducingResumeData: ^(NSData * _Nullable resumeData)
{
[m_downloadTask cancelByProducingResumeData:^(NSData *resumeData) {
if (resumeData && resumeData.bytes && resumeData.length)
didCancel(IPC::DataReference(reinterpret_cast<const uint8_t*>(resumeData.bytes), resumeData.length));
else
Expand Down
3 changes: 1 addition & 2 deletions Source/WebKit/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp
Expand Up @@ -34,9 +34,8 @@
#include <wtf/NeverDestroyed.h>
#include <wtf/RunLoop.h>

using namespace WebCore;

namespace WebKit {
using namespace WebCore;

NetworkBlobRegistry& NetworkBlobRegistry::singleton()
{
Expand Down
2 changes: 2 additions & 0 deletions Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.cpp
Expand Up @@ -170,3 +170,5 @@ NetworkTransactionInformation NetworkCORSPreflightChecker::takeInformation()
}

} // Namespace WebKit

#undef RELEASE_LOG_IF_ALLOWED
Expand Up @@ -58,9 +58,8 @@
#include <WebCore/SecurityPolicy.h>
#include <pal/SessionID.h>

using namespace WebCore;

namespace WebKit {
using namespace WebCore;

Ref<NetworkConnectionToWebProcess> NetworkConnectionToWebProcess::create(IPC::Connection::Identifier connectionIdentifier)
{
Expand Down
Expand Up @@ -32,9 +32,8 @@
#include "NetworkProcessProxyMessages.h"
#include "WebCompiledContentRuleList.h"

using namespace WebCore;

namespace WebKit {
using namespace WebCore;

NetworkContentRuleListManager::NetworkContentRuleListManager() = default;
NetworkContentRuleListManager::~NetworkContentRuleListManager()
Expand Down
3 changes: 1 addition & 2 deletions Source/WebKit/NetworkProcess/NetworkDataTask.cpp
Expand Up @@ -44,9 +44,8 @@
#include "NetworkDataTaskCurl.h"
#endif

using namespace WebCore;

namespace WebKit {
using namespace WebCore;

Ref<NetworkDataTask> NetworkDataTask::create(NetworkSession& session, NetworkDataTaskClient& client, const NetworkLoadParameters& parameters)
{
Expand Down
3 changes: 1 addition & 2 deletions Source/WebKit/NetworkProcess/NetworkDataTaskBlob.cpp
Expand Up @@ -52,9 +52,8 @@
#include <wtf/MainThread.h>
#include <wtf/RunLoop.h>

using namespace WebCore;

namespace WebKit {
using namespace WebCore;

static const unsigned bufferSize = 512 * 1024;

Expand Down
2 changes: 2 additions & 0 deletions Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp
Expand Up @@ -431,3 +431,5 @@ void NetworkLoadChecker::storeRedirectionIfNeeded(const ResourceRequest& request
}

} // namespace WebKit

#undef RELEASE_LOG_IF_ALLOWED
3 changes: 1 addition & 2 deletions Source/WebKit/NetworkProcess/NetworkProcess.cpp
Expand Up @@ -95,9 +95,8 @@
#include "NetworkSessionCocoa.h"
#endif

using namespace WebCore;

namespace WebKit {
using namespace WebCore;

NetworkProcess& NetworkProcess::singleton()
{
Expand Down
Expand Up @@ -29,9 +29,8 @@
#include <WebCore/BlobRegistryImpl.h>
#include <wtf/NeverDestroyed.h>

using namespace WebCore;

namespace WebKit {
using namespace WebCore;

void NetworkProcessPlatformStrategies::initialize()
{
Expand Down
Expand Up @@ -31,9 +31,8 @@
#include "WebCoreArgumentCoders.h"
#include <WebCore/SecurityOriginData.h>

using namespace WebCore;

namespace WebKit {
using namespace WebCore;

void NetworkResourceLoadParameters::encode(IPC::Encoder& encoder) const
{
Expand Down
6 changes: 4 additions & 2 deletions Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
Expand Up @@ -65,12 +65,11 @@
#include <WebCore/PreviewLoader.h>
#endif

using namespace WebCore;

#define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkResourceLoader::" fmt, this, ##__VA_ARGS__)
#define RELEASE_LOG_ERROR_IF_ALLOWED(fmt, ...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkResourceLoader::" fmt, this, ##__VA_ARGS__)

namespace WebKit {
using namespace WebCore;

struct NetworkResourceLoader::SynchronousLoadData {
SynchronousLoadData(Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::DelayedReply&& reply)
Expand Down Expand Up @@ -1123,3 +1122,6 @@ void NetworkResourceLoader::logSlowCacheRetrieveIfNeeded(const NetworkCache::Cac
}

} // namespace WebKit

#undef RELEASE_LOG_IF_ALLOWED
#undef RELEASE_LOG_ERROR_IF_ALLOWED
4 changes: 1 addition & 3 deletions Source/WebKit/NetworkProcess/NetworkSession.cpp
Expand Up @@ -41,10 +41,8 @@
#include "NetworkSessionCurl.h"
#endif


using namespace WebCore;

namespace WebKit {
using namespace WebCore;

Ref<NetworkSession> NetworkSession::create(NetworkSessionCreationParameters&& parameters)
{
Expand Down
3 changes: 1 addition & 2 deletions Source/WebKit/NetworkProcess/NetworkSocketStream.cpp
Expand Up @@ -32,9 +32,8 @@
#include <WebCore/SocketStreamError.h>
#include <WebCore/SocketStreamHandleImpl.h>

using namespace WebCore;

namespace WebKit {
using namespace WebCore;

Ref<NetworkSocketStream> NetworkSocketStream::create(WebCore::URL&& url, PAL::SessionID sessionID, const String& credentialPartition, uint64_t identifier, IPC::Connection& connection, SourceApplicationAuditToken&& auditData)
{
Expand Down
2 changes: 2 additions & 0 deletions Source/WebKit/NetworkProcess/PingLoad.cpp
Expand Up @@ -175,3 +175,5 @@ const URL& PingLoad::currentURL() const
}

} // namespace WebKit

#undef RELEASE_LOG_IF_ALLOWED
6 changes: 3 additions & 3 deletions Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp
Expand Up @@ -39,13 +39,13 @@
#include <wtf/text/StringBuilder.h>
#include <wtf/text/StringHash.h>

using namespace WebCore::DOMCacheEngine;
using namespace WebKit::NetworkCache;

namespace WebKit {

namespace CacheStorage {

using namespace WebCore::DOMCacheEngine;
using namespace NetworkCache;

static HashMap<PAL::SessionID, RefPtr<Engine>>& globalEngineMap()
{
static NeverDestroyed<HashMap<PAL::SessionID, RefPtr<Engine>>> map;
Expand Down
Expand Up @@ -44,15 +44,14 @@
#include <wtf/text/StringBuilder.h>
#include <wtf/text/StringHash.h>


using namespace WebCore;
using namespace WebCore::DOMCacheEngine;
using namespace WebKit::NetworkCache;

namespace WebKit {

namespace CacheStorage {

using namespace WebCore;
using namespace WebCore::DOMCacheEngine;
using namespace NetworkCache;

static inline String computeKeyURL(const URL& url)
{
URL keyURL { url };
Expand Down
Expand Up @@ -33,12 +33,11 @@
#include <wtf/UUID.h>
#include <wtf/text/StringBuilder.h>

using namespace WebCore::DOMCacheEngine;
using namespace WebKit::NetworkCache;

namespace WebKit {

namespace CacheStorage {
using namespace WebCore::DOMCacheEngine;
using namespace NetworkCache;

static inline String cachesListFilename(const String& cachesRootPath)
{
Expand Down
Expand Up @@ -33,10 +33,9 @@
#include "WebCoreArgumentCoders.h"
#include <WebCore/CacheQueryOptions.h>

using namespace WebCore::DOMCacheEngine;
using namespace WebKit::CacheStorage;

namespace WebKit {
using namespace WebCore::DOMCacheEngine;
using namespace CacheStorage;

#define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), CacheStorage, "%p - CacheStorageEngineConnection::" fmt, &m_connection.connection(), ##__VA_ARGS__)
#define RELEASE_LOG_FUNCTION_IF_ALLOWED_IN_CALLBACK(functionName, fmt, resultGetter) \
Expand Down Expand Up @@ -166,3 +165,6 @@ void CacheStorageEngineConnection::engineRepresentation(PAL::SessionID sessionID
}

}

#undef RELEASE_LOG_IF_ALLOWED
#undef RELEASE_LOG_FUNCTION_IF_ALLOWED_IN_CALLBACK
4 changes: 2 additions & 2 deletions Source/WebKit/NetworkProcess/cache/NetworkCache.cpp
Expand Up @@ -47,11 +47,11 @@
#include <notify.h>
#endif

using namespace WebCore::FileSystem;

namespace WebKit {
namespace NetworkCache {

using namespace WebCore::FileSystem;

static const AtomicString& resourceType()
{
ASSERT(WTF::RunLoop::isMain());
Expand Down
2 changes: 2 additions & 0 deletions Source/WebKit/NetworkProcess/capture/NetworkCaptureEvent.cpp
Expand Up @@ -504,4 +504,6 @@ OptionalCaptureEvent stringToEvent(const char* jsonStr)
} // namespace NetworkCapture
} // namespace WebKit

#undef JSON_NOEXCEPTIONS

#endif // ENABLE(NETWORK_CAPTURE)
Expand Up @@ -42,11 +42,11 @@

#define DEBUG_CLASS Manager

using namespace WebCore::FileSystem;

namespace WebKit {
namespace NetworkCapture {

using namespace WebCore::FileSystem;

static const char* kDirNameRecordReplay = "WebKitPerf/record_replay";
static const char* kDirNameResources = "resources";
static const char* kFileNameReportLoad = "report_load.txt";
Expand Down Expand Up @@ -582,4 +582,6 @@ bool Manager::getWord(uint8_t const *& p, uint8_t const * const end, String& wor
} // namespace NetworkCapture
} // namespace WebKit

#undef DEBUG_CLASS

#endif // ENABLE(NETWORK_CAPTURE)
Expand Up @@ -153,4 +153,6 @@ void Recorder::writeEvents()
} // namespace NetworkCapture
} // namespace WebKit

#undef DEBUG_CLASS

#endif // ENABLE(NETWORK_CAPTURE)
Expand Up @@ -48,4 +48,6 @@ Ref<NetworkDataTask> Replayer::replayResource(NetworkSession& session, NetworkDa
} // namespace NetworkCapture
} // namespace WebKit

#undef DEBUG_CLASS

#endif // ENABLE(NETWORK_CAPTURE)
Expand Up @@ -288,4 +288,6 @@ void NetworkDataTaskReplay::didFinish(const WebCore::ResourceError& error)
} // namespace NetworkCapture
} // namespace WebKit

#undef DEBUG_CLASS

#endif // ENABLE(NETWORK_CAPTURE)

0 comments on commit d88c831

Please sign in to comment.