1/*
2 * Copyright (C) 2010-2018 Apple Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16 * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
17 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
20 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
21 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#include "config.h"
26
27#include "NetworkConnectionToWebProcess.h"
28
29#include "ArgumentCoders.h"
30#include "Decoder.h"
31#include "DownloadID.h"
32#include "HandleMessage.h"
33#include "NetworkConnectionToWebProcessMessages.h"
34#include "NetworkResourceLoadParameters.h"
35#include "SandboxExtension.h"
36#include "WebCoreArgumentCoders.h"
37#include <WebCore/BlobPart.h>
38#include <WebCore/Cookie.h>
39#include <WebCore/CookieJar.h>
40#if ENABLE(RESOURCE_LOAD_STATISTICS)
41#include <WebCore/DocumentStorageAccess.h>
42#endif
43#include <WebCore/NetworkLoadInformation.h>
44#include <WebCore/NetworkLoadMetrics.h>
45#include <WebCore/ProcessIdentifier.h>
46#if ENABLE(RESOURCE_LOAD_STATISTICS)
47#include <WebCore/RegistrableDomain.h>
48#endif
49#include <WebCore/ResourceError.h>
50#if ENABLE(RESOURCE_LOAD_STATISTICS)
51#include <WebCore/ResourceLoadStatistics.h>
52#endif
53#include <WebCore/ResourceRequest.h>
54#include <WebCore/ResourceResponse.h>
55#include <WebCore/SameSiteInfo.h>
56#if ENABLE(SERVICE_WORKER)
57#include <WebCore/ServiceWorkerTypes.h>
58#endif
59#include <pal/SessionID.h>
60#include <wtf/Optional.h>
61#include <wtf/Vector.h>
62#if ENABLE(RESOURCE_LOAD_STATISTICS)
63#include <wtf/WallTime.h>
64#endif
65#include <wtf/text/WTFString.h>
66
67namespace Messages {
68
69namespace NetworkConnectionToWebProcess {
70
71void PerformSynchronousLoad::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const WebCore::ResourceError& error, const WebCore::ResourceResponse& response, const Vector<char>& data)
72{
73 *encoder << error;
74 *encoder << response;
75 *encoder << data;
76 connection.sendSyncReply(WTFMove(encoder));
77}
78
79void CookiesForDOM::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const String& cookieString, bool didAccessSecureCookies)
80{
81 *encoder << cookieString;
82 *encoder << didAccessSecureCookies;
83 connection.sendSyncReply(WTFMove(encoder));
84}
85
86void CookiesEnabled::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, bool enabled)
87{
88 *encoder << enabled;
89 connection.sendSyncReply(WTFMove(encoder));
90}
91
92void CookieRequestHeaderFieldValue::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const String& cookieString, bool didAccessSecureCookies)
93{
94 *encoder << cookieString;
95 *encoder << didAccessSecureCookies;
96 connection.sendSyncReply(WTFMove(encoder));
97}
98
99void GetRawCookies::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const Vector<WebCore::Cookie>& cookies)
100{
101 *encoder << cookies;
102 connection.sendSyncReply(WTFMove(encoder));
103}
104
105void BlobSize::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, uint64_t resultSize)
106{
107 *encoder << resultSize;
108 connection.sendSyncReply(WTFMove(encoder));
109}
110
111void WriteBlobsToTemporaryFiles::callReply(IPC::Decoder& decoder, CompletionHandler<void(Vector<String>&&)>&& completionHandler)
112{
113 Optional<Vector<String>> fileNames;
114 decoder >> fileNames;
115 if (!fileNames) {
116 ASSERT_NOT_REACHED();
117 return;
118 }
119 completionHandler(WTFMove(*fileNames));
120}
121
122void WriteBlobsToTemporaryFiles::cancelReply(CompletionHandler<void(Vector<String>&&)>&& completionHandler)
123{
124 completionHandler({ });
125}
126
127void WriteBlobsToTemporaryFiles::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const Vector<String>& fileNames)
128{
129 *encoder << fileNames;
130 connection.sendSyncReply(WTFMove(encoder));
131}
132
133#if ENABLE(RESOURCE_LOAD_STATISTICS)
134
135void HasStorageAccess::callReply(IPC::Decoder& decoder, CompletionHandler<void(bool&&)>&& completionHandler)
136{
137 Optional<bool> hasStorageAccess;
138 decoder >> hasStorageAccess;
139 if (!hasStorageAccess) {
140 ASSERT_NOT_REACHED();
141 return;
142 }
143 completionHandler(WTFMove(*hasStorageAccess));
144}
145
146void HasStorageAccess::cancelReply(CompletionHandler<void(bool&&)>&& completionHandler)
147{
148 completionHandler({ });
149}
150
151void HasStorageAccess::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, bool hasStorageAccess)
152{
153 *encoder << hasStorageAccess;
154 connection.sendSyncReply(WTFMove(encoder));
155}
156
157#endif
158
159#if ENABLE(RESOURCE_LOAD_STATISTICS)
160
161void RequestStorageAccess::callReply(IPC::Decoder& decoder, CompletionHandler<void(WebCore::StorageAccessWasGranted&&, WebCore::StorageAccessPromptWasShown&&)>&& completionHandler)
162{
163 Optional<WebCore::StorageAccessWasGranted> wasGranted;
164 decoder >> wasGranted;
165 if (!wasGranted) {
166 ASSERT_NOT_REACHED();
167 return;
168 }
169 Optional<WebCore::StorageAccessPromptWasShown> promptWasShown;
170 decoder >> promptWasShown;
171 if (!promptWasShown) {
172 ASSERT_NOT_REACHED();
173 return;
174 }
175 completionHandler(WTFMove(*wasGranted), WTFMove(*promptWasShown));
176}
177
178void RequestStorageAccess::cancelReply(CompletionHandler<void(WebCore::StorageAccessWasGranted&&, WebCore::StorageAccessPromptWasShown&&)>&& completionHandler)
179{
180 completionHandler({ }, { });
181}
182
183void RequestStorageAccess::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, WebCore::StorageAccessWasGranted wasGranted, WebCore::StorageAccessPromptWasShown promptWasShown)
184{
185 *encoder << wasGranted;
186 *encoder << promptWasShown;
187 connection.sendSyncReply(WTFMove(encoder));
188}
189
190#endif
191
192void GetNetworkLoadInformationRequest::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const WebCore::ResourceRequest& request)
193{
194 *encoder << request;
195 connection.sendSyncReply(WTFMove(encoder));
196}
197
198void GetNetworkLoadInformationResponse::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const WebCore::ResourceResponse& response)
199{
200 *encoder << response;
201 connection.sendSyncReply(WTFMove(encoder));
202}
203
204void GetNetworkLoadIntermediateInformation::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const Vector<WebCore::NetworkTransactionInformation>& transactions)
205{
206 *encoder << transactions;
207 connection.sendSyncReply(WTFMove(encoder));
208}
209
210void TakeNetworkLoadInformationMetrics::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const WebCore::NetworkLoadMetrics& networkMetrics)
211{
212 *encoder << networkMetrics;
213 connection.sendSyncReply(WTFMove(encoder));
214}
215
216#if ENABLE(INDEXED_DATABASE)
217
218void EstablishIDBConnectionToServer::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, uint64_t serverConnectionIdentifier)
219{
220 *encoder << serverConnectionIdentifier;
221 connection.sendSyncReply(WTFMove(encoder));
222}
223
224#endif
225
226#if ENABLE(SERVICE_WORKER)
227
228void EstablishSWServerConnection::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const WebCore::SWServerConnectionIdentifier& serverConnectionIdentifier)
229{
230 *encoder << serverConnectionIdentifier;
231 connection.sendSyncReply(WTFMove(encoder));
232}
233
234#endif
235
236} // namespace NetworkConnectionToWebProcess
237
238} // namespace Messages
239
240namespace WebKit {
241
242void NetworkConnectionToWebProcess::didReceiveNetworkConnectionToWebProcessMessage(IPC::Connection& connection, IPC::Decoder& decoder)
243{
244 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::ScheduleResourceLoad::name()) {
245 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::ScheduleResourceLoad>(decoder, this, &NetworkConnectionToWebProcess::scheduleResourceLoad);
246 return;
247 }
248 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::LoadPing::name()) {
249 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::LoadPing>(decoder, this, &NetworkConnectionToWebProcess::loadPing);
250 return;
251 }
252 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::RemoveLoadIdentifier::name()) {
253 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::RemoveLoadIdentifier>(decoder, this, &NetworkConnectionToWebProcess::removeLoadIdentifier);
254 return;
255 }
256 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::PageLoadCompleted::name()) {
257 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::PageLoadCompleted>(decoder, this, &NetworkConnectionToWebProcess::pageLoadCompleted);
258 return;
259 }
260 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::PrefetchDNS::name()) {
261 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::PrefetchDNS>(decoder, this, &NetworkConnectionToWebProcess::prefetchDNS);
262 return;
263 }
264 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::PreconnectTo::name()) {
265 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::PreconnectTo>(decoder, this, &NetworkConnectionToWebProcess::preconnectTo);
266 return;
267 }
268 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::StartDownload::name()) {
269 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::StartDownload>(decoder, this, &NetworkConnectionToWebProcess::startDownload);
270 return;
271 }
272 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::ConvertMainResourceLoadToDownload::name()) {
273 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::ConvertMainResourceLoadToDownload>(decoder, this, &NetworkConnectionToWebProcess::convertMainResourceLoadToDownload);
274 return;
275 }
276 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::SetCookiesFromDOM::name()) {
277 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::SetCookiesFromDOM>(decoder, this, &NetworkConnectionToWebProcess::setCookiesFromDOM);
278 return;
279 }
280 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::DeleteCookie::name()) {
281 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::DeleteCookie>(decoder, this, &NetworkConnectionToWebProcess::deleteCookie);
282 return;
283 }
284 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::RegisterFileBlobURL::name()) {
285 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::RegisterFileBlobURL>(decoder, this, &NetworkConnectionToWebProcess::registerFileBlobURL);
286 return;
287 }
288 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::RegisterBlobURL::name()) {
289 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::RegisterBlobURL>(decoder, this, &NetworkConnectionToWebProcess::registerBlobURL);
290 return;
291 }
292 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::RegisterBlobURLFromURL::name()) {
293 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::RegisterBlobURLFromURL>(decoder, this, &NetworkConnectionToWebProcess::registerBlobURLFromURL);
294 return;
295 }
296 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::RegisterBlobURLOptionallyFileBacked::name()) {
297 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::RegisterBlobURLOptionallyFileBacked>(decoder, this, &NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked);
298 return;
299 }
300 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::RegisterBlobURLForSlice::name()) {
301 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::RegisterBlobURLForSlice>(decoder, this, &NetworkConnectionToWebProcess::registerBlobURLForSlice);
302 return;
303 }
304 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::UnregisterBlobURL::name()) {
305 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::UnregisterBlobURL>(decoder, this, &NetworkConnectionToWebProcess::unregisterBlobURL);
306 return;
307 }
308 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::WriteBlobsToTemporaryFiles::name()) {
309 IPC::handleMessageAsync<Messages::NetworkConnectionToWebProcess::WriteBlobsToTemporaryFiles>(connection, decoder, this, &NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles);
310 return;
311 }
312 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::SetCaptureExtraNetworkLoadMetricsEnabled::name()) {
313 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::SetCaptureExtraNetworkLoadMetricsEnabled>(decoder, this, &NetworkConnectionToWebProcess::setCaptureExtraNetworkLoadMetricsEnabled);
314 return;
315 }
316 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::CreateSocketStream::name()) {
317 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::CreateSocketStream>(decoder, this, &NetworkConnectionToWebProcess::createSocketStream);
318 return;
319 }
320 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::EnsureLegacyPrivateBrowsingSession::name()) {
321 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::EnsureLegacyPrivateBrowsingSession>(decoder, this, &NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession);
322 return;
323 }
324#if ENABLE(RESOURCE_LOAD_STATISTICS)
325 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::RemoveStorageAccessForFrame::name()) {
326 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::RemoveStorageAccessForFrame>(decoder, this, &NetworkConnectionToWebProcess::removeStorageAccessForFrame);
327 return;
328 }
329#endif
330#if ENABLE(RESOURCE_LOAD_STATISTICS)
331 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::ClearPageSpecificDataForResourceLoadStatistics::name()) {
332 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::ClearPageSpecificDataForResourceLoadStatistics>(decoder, this, &NetworkConnectionToWebProcess::clearPageSpecificDataForResourceLoadStatistics);
333 return;
334 }
335#endif
336#if ENABLE(RESOURCE_LOAD_STATISTICS)
337 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::LogUserInteraction::name()) {
338 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::LogUserInteraction>(decoder, this, &NetworkConnectionToWebProcess::logUserInteraction);
339 return;
340 }
341#endif
342#if ENABLE(RESOURCE_LOAD_STATISTICS)
343 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::LogWebSocketLoading::name()) {
344 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::LogWebSocketLoading>(decoder, this, &NetworkConnectionToWebProcess::logWebSocketLoading);
345 return;
346 }
347#endif
348#if ENABLE(RESOURCE_LOAD_STATISTICS)
349 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::LogSubresourceLoading::name()) {
350 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::LogSubresourceLoading>(decoder, this, &NetworkConnectionToWebProcess::logSubresourceLoading);
351 return;
352 }
353#endif
354#if ENABLE(RESOURCE_LOAD_STATISTICS)
355 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::LogSubresourceRedirect::name()) {
356 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::LogSubresourceRedirect>(decoder, this, &NetworkConnectionToWebProcess::logSubresourceRedirect);
357 return;
358 }
359#endif
360#if ENABLE(RESOURCE_LOAD_STATISTICS)
361 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::ResourceLoadStatisticsUpdated::name()) {
362 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::ResourceLoadStatisticsUpdated>(decoder, this, &NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated);
363 return;
364 }
365#endif
366#if ENABLE(RESOURCE_LOAD_STATISTICS)
367 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::HasStorageAccess::name()) {
368 IPC::handleMessageAsync<Messages::NetworkConnectionToWebProcess::HasStorageAccess>(connection, decoder, this, &NetworkConnectionToWebProcess::hasStorageAccess);
369 return;
370 }
371#endif
372#if ENABLE(RESOURCE_LOAD_STATISTICS)
373 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::RequestStorageAccess::name()) {
374 IPC::handleMessageAsync<Messages::NetworkConnectionToWebProcess::RequestStorageAccess>(connection, decoder, this, &NetworkConnectionToWebProcess::requestStorageAccess);
375 return;
376 }
377#endif
378#if ENABLE(RESOURCE_LOAD_STATISTICS)
379 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::RequestStorageAccessUnderOpener::name()) {
380 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::RequestStorageAccessUnderOpener>(decoder, this, &NetworkConnectionToWebProcess::requestStorageAccessUnderOpener);
381 return;
382 }
383#endif
384 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::AddOriginAccessWhitelistEntry::name()) {
385 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::AddOriginAccessWhitelistEntry>(decoder, this, &NetworkConnectionToWebProcess::addOriginAccessWhitelistEntry);
386 return;
387 }
388 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::RemoveOriginAccessWhitelistEntry::name()) {
389 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::RemoveOriginAccessWhitelistEntry>(decoder, this, &NetworkConnectionToWebProcess::removeOriginAccessWhitelistEntry);
390 return;
391 }
392 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::ResetOriginAccessWhitelists::name()) {
393 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::ResetOriginAccessWhitelists>(decoder, this, &NetworkConnectionToWebProcess::resetOriginAccessWhitelists);
394 return;
395 }
396 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::SetWebProcessIdentifier::name()) {
397 IPC::handleMessage<Messages::NetworkConnectionToWebProcess::SetWebProcessIdentifier>(decoder, this, &NetworkConnectionToWebProcess::setWebProcessIdentifier);
398 return;
399 }
400 UNUSED_PARAM(connection);
401 UNUSED_PARAM(decoder);
402 ASSERT_NOT_REACHED();
403}
404
405void NetworkConnectionToWebProcess::didReceiveSyncNetworkConnectionToWebProcessMessage(IPC::Connection& connection, IPC::Decoder& decoder, std::unique_ptr<IPC::Encoder>& replyEncoder)
406{
407 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::name()) {
408 IPC::handleMessageSynchronous<Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad>(connection, decoder, replyEncoder, this, &NetworkConnectionToWebProcess::performSynchronousLoad);
409 return;
410 }
411 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::CookiesForDOM::name()) {
412 IPC::handleMessageSynchronous<Messages::NetworkConnectionToWebProcess::CookiesForDOM>(connection, decoder, replyEncoder, this, &NetworkConnectionToWebProcess::cookiesForDOM);
413 return;
414 }
415 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::CookiesEnabled::name()) {
416 IPC::handleMessageSynchronous<Messages::NetworkConnectionToWebProcess::CookiesEnabled>(connection, decoder, replyEncoder, this, &NetworkConnectionToWebProcess::cookiesEnabled);
417 return;
418 }
419 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue::name()) {
420 IPC::handleMessageSynchronous<Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue>(connection, decoder, replyEncoder, this, &NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue);
421 return;
422 }
423 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::GetRawCookies::name()) {
424 IPC::handleMessageSynchronous<Messages::NetworkConnectionToWebProcess::GetRawCookies>(connection, decoder, replyEncoder, this, &NetworkConnectionToWebProcess::getRawCookies);
425 return;
426 }
427 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::BlobSize::name()) {
428 IPC::handleMessageSynchronous<Messages::NetworkConnectionToWebProcess::BlobSize>(connection, decoder, replyEncoder, this, &NetworkConnectionToWebProcess::blobSize);
429 return;
430 }
431 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::GetNetworkLoadInformationRequest::name()) {
432 IPC::handleMessageSynchronous<Messages::NetworkConnectionToWebProcess::GetNetworkLoadInformationRequest>(connection, decoder, replyEncoder, this, &NetworkConnectionToWebProcess::getNetworkLoadInformationRequest);
433 return;
434 }
435 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::GetNetworkLoadInformationResponse::name()) {
436 IPC::handleMessageSynchronous<Messages::NetworkConnectionToWebProcess::GetNetworkLoadInformationResponse>(connection, decoder, replyEncoder, this, &NetworkConnectionToWebProcess::getNetworkLoadInformationResponse);
437 return;
438 }
439 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::GetNetworkLoadIntermediateInformation::name()) {
440 IPC::handleMessageSynchronous<Messages::NetworkConnectionToWebProcess::GetNetworkLoadIntermediateInformation>(connection, decoder, replyEncoder, this, &NetworkConnectionToWebProcess::getNetworkLoadIntermediateInformation);
441 return;
442 }
443 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::TakeNetworkLoadInformationMetrics::name()) {
444 IPC::handleMessageSynchronous<Messages::NetworkConnectionToWebProcess::TakeNetworkLoadInformationMetrics>(connection, decoder, replyEncoder, this, &NetworkConnectionToWebProcess::takeNetworkLoadInformationMetrics);
445 return;
446 }
447#if ENABLE(INDEXED_DATABASE)
448 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::EstablishIDBConnectionToServer::name()) {
449 IPC::handleMessageSynchronous<Messages::NetworkConnectionToWebProcess::EstablishIDBConnectionToServer>(connection, decoder, replyEncoder, this, &NetworkConnectionToWebProcess::establishIDBConnectionToServer);
450 return;
451 }
452#endif
453#if ENABLE(SERVICE_WORKER)
454 if (decoder.messageName() == Messages::NetworkConnectionToWebProcess::EstablishSWServerConnection::name()) {
455 IPC::handleMessageSynchronous<Messages::NetworkConnectionToWebProcess::EstablishSWServerConnection>(connection, decoder, replyEncoder, this, &NetworkConnectionToWebProcess::establishSWServerConnection);
456 return;
457 }
458#endif
459 UNUSED_PARAM(connection);
460 UNUSED_PARAM(decoder);
461 UNUSED_PARAM(replyEncoder);
462 ASSERT_NOT_REACHED();
463}
464
465} // namespace WebKit
466
467