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 "NetworkProcess.h" |
28 | |
29 | #include "ArgumentCoders.h" |
30 | #include "CacheModel.h" |
31 | #include "DataReference.h" |
32 | #include "Decoder.h" |
33 | #include "DownloadID.h" |
34 | #include "HandleMessage.h" |
35 | #include "LocalStorageDatabaseTracker.h" |
36 | #include "NetworkProcessCreationParameters.h" |
37 | #include "NetworkProcessMessages.h" |
38 | #include "SandboxExtension.h" |
39 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
40 | #include "ShouldGrandfatherStatistics.h" |
41 | #endif |
42 | #include "WebCoreArgumentCoders.h" |
43 | #include "WebsiteDataFetchOption.h" |
44 | #include "WebsiteDataStoreParameters.h" |
45 | #include "WebsiteDataType.h" |
46 | #include <WebCore/AdClickAttribution.h> |
47 | #include <WebCore/CertificateInfo.h> |
48 | #include <WebCore/ClientOrigin.h> |
49 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
50 | #include <WebCore/CrossSiteNavigationDataTransfer.h> |
51 | #endif |
52 | #if USE(CURL) |
53 | #include <WebCore/CurlProxySettings.h> |
54 | #endif |
55 | #if ENABLE(SERVICE_WORKER) |
56 | #include <WebCore/MessageWithMessagePorts.h> |
57 | #endif |
58 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
59 | #include <WebCore/PageIdentifier.h> |
60 | #endif |
61 | #include <WebCore/RegistrableDomain.h> |
62 | #include <WebCore/ResourceRequest.h> |
63 | #include <WebCore/SecurityOriginData.h> |
64 | #if ENABLE(SERVICE_WORKER) |
65 | #include <WebCore/ServiceWorkerClientIdentifier.h> |
66 | #endif |
67 | #if ENABLE(SERVICE_WORKER) |
68 | #include <WebCore/ServiceWorkerIdentifier.h> |
69 | #endif |
70 | #if ENABLE(SERVICE_WORKER) |
71 | #include <WebCore/ServiceWorkerTypes.h> |
72 | #endif |
73 | #if USE(SOUP) |
74 | #include <WebCore/SoupNetworkProxySettings.h> |
75 | #endif |
76 | #include <WebCore/StoredCredentialsPolicy.h> |
77 | #include <pal/SessionID.h> |
78 | #include <wtf/OptionSet.h> |
79 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
80 | #include <wtf/Optional.h> |
81 | #endif |
82 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
83 | #include <wtf/Seconds.h> |
84 | #endif |
85 | #include <wtf/Vector.h> |
86 | #include <wtf/WallTime.h> |
87 | #include <wtf/text/WTFString.h> |
88 | |
89 | namespace Messages { |
90 | |
91 | namespace NetworkProcess { |
92 | |
93 | void SetAllowsAnySSLCertificateForWebSocket::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
94 | { |
95 | connection.sendSyncReply(WTFMove(encoder)); |
96 | } |
97 | |
98 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
99 | |
100 | void ClearPrevalentResource::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
101 | { |
102 | completionHandler(); |
103 | } |
104 | |
105 | void ClearPrevalentResource::cancelReply(CompletionHandler<void()>&& completionHandler) |
106 | { |
107 | completionHandler(); |
108 | } |
109 | |
110 | void ClearPrevalentResource::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
111 | { |
112 | connection.sendSyncReply(WTFMove(encoder)); |
113 | } |
114 | |
115 | #endif |
116 | |
117 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
118 | |
119 | void ClearUserInteraction::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
120 | { |
121 | completionHandler(); |
122 | } |
123 | |
124 | void ClearUserInteraction::cancelReply(CompletionHandler<void()>&& completionHandler) |
125 | { |
126 | completionHandler(); |
127 | } |
128 | |
129 | void ClearUserInteraction::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
130 | { |
131 | connection.sendSyncReply(WTFMove(encoder)); |
132 | } |
133 | |
134 | #endif |
135 | |
136 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
137 | |
138 | void DumpResourceLoadStatistics::callReply(IPC::Decoder& decoder, CompletionHandler<void(String&&)>&& completionHandler) |
139 | { |
140 | Optional<String> dumpedStatistics; |
141 | decoder >> dumpedStatistics; |
142 | if (!dumpedStatistics) { |
143 | ASSERT_NOT_REACHED(); |
144 | cancelReply(WTFMove(completionHandler)); |
145 | return; |
146 | } |
147 | completionHandler(WTFMove(*dumpedStatistics)); |
148 | } |
149 | |
150 | void DumpResourceLoadStatistics::cancelReply(CompletionHandler<void(String&&)>&& completionHandler) |
151 | { |
152 | completionHandler(IPC::AsyncReplyError<String>::create()); |
153 | } |
154 | |
155 | void DumpResourceLoadStatistics::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const String& dumpedStatistics) |
156 | { |
157 | *encoder << dumpedStatistics; |
158 | connection.sendSyncReply(WTFMove(encoder)); |
159 | } |
160 | |
161 | #endif |
162 | |
163 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
164 | |
165 | void UpdatePrevalentDomainsToBlockCookiesFor::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
166 | { |
167 | completionHandler(); |
168 | } |
169 | |
170 | void UpdatePrevalentDomainsToBlockCookiesFor::cancelReply(CompletionHandler<void()>&& completionHandler) |
171 | { |
172 | completionHandler(); |
173 | } |
174 | |
175 | void UpdatePrevalentDomainsToBlockCookiesFor::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
176 | { |
177 | connection.sendSyncReply(WTFMove(encoder)); |
178 | } |
179 | |
180 | #endif |
181 | |
182 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
183 | |
184 | void IsGrandfathered::callReply(IPC::Decoder& decoder, CompletionHandler<void(bool&&)>&& completionHandler) |
185 | { |
186 | Optional<bool> isGrandfathered; |
187 | decoder >> isGrandfathered; |
188 | if (!isGrandfathered) { |
189 | ASSERT_NOT_REACHED(); |
190 | cancelReply(WTFMove(completionHandler)); |
191 | return; |
192 | } |
193 | completionHandler(WTFMove(*isGrandfathered)); |
194 | } |
195 | |
196 | void IsGrandfathered::cancelReply(CompletionHandler<void(bool&&)>&& completionHandler) |
197 | { |
198 | completionHandler(IPC::AsyncReplyError<bool>::create()); |
199 | } |
200 | |
201 | void IsGrandfathered::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, bool isGrandfathered) |
202 | { |
203 | *encoder << isGrandfathered; |
204 | connection.sendSyncReply(WTFMove(encoder)); |
205 | } |
206 | |
207 | #endif |
208 | |
209 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
210 | |
211 | void IsPrevalentResource::callReply(IPC::Decoder& decoder, CompletionHandler<void(bool&&)>&& completionHandler) |
212 | { |
213 | Optional<bool> isPrevalent; |
214 | decoder >> isPrevalent; |
215 | if (!isPrevalent) { |
216 | ASSERT_NOT_REACHED(); |
217 | cancelReply(WTFMove(completionHandler)); |
218 | return; |
219 | } |
220 | completionHandler(WTFMove(*isPrevalent)); |
221 | } |
222 | |
223 | void IsPrevalentResource::cancelReply(CompletionHandler<void(bool&&)>&& completionHandler) |
224 | { |
225 | completionHandler(IPC::AsyncReplyError<bool>::create()); |
226 | } |
227 | |
228 | void IsPrevalentResource::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, bool isPrevalent) |
229 | { |
230 | *encoder << isPrevalent; |
231 | connection.sendSyncReply(WTFMove(encoder)); |
232 | } |
233 | |
234 | #endif |
235 | |
236 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
237 | |
238 | void IsVeryPrevalentResource::callReply(IPC::Decoder& decoder, CompletionHandler<void(bool&&)>&& completionHandler) |
239 | { |
240 | Optional<bool> isVeryPrevalent; |
241 | decoder >> isVeryPrevalent; |
242 | if (!isVeryPrevalent) { |
243 | ASSERT_NOT_REACHED(); |
244 | cancelReply(WTFMove(completionHandler)); |
245 | return; |
246 | } |
247 | completionHandler(WTFMove(*isVeryPrevalent)); |
248 | } |
249 | |
250 | void IsVeryPrevalentResource::cancelReply(CompletionHandler<void(bool&&)>&& completionHandler) |
251 | { |
252 | completionHandler(IPC::AsyncReplyError<bool>::create()); |
253 | } |
254 | |
255 | void IsVeryPrevalentResource::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, bool isVeryPrevalent) |
256 | { |
257 | *encoder << isVeryPrevalent; |
258 | connection.sendSyncReply(WTFMove(encoder)); |
259 | } |
260 | |
261 | #endif |
262 | |
263 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
264 | |
265 | void SetAgeCapForClientSideCookies::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
266 | { |
267 | completionHandler(); |
268 | } |
269 | |
270 | void SetAgeCapForClientSideCookies::cancelReply(CompletionHandler<void()>&& completionHandler) |
271 | { |
272 | completionHandler(); |
273 | } |
274 | |
275 | void SetAgeCapForClientSideCookies::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
276 | { |
277 | connection.sendSyncReply(WTFMove(encoder)); |
278 | } |
279 | |
280 | #endif |
281 | |
282 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
283 | |
284 | void SetLastSeen::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
285 | { |
286 | completionHandler(); |
287 | } |
288 | |
289 | void SetLastSeen::cancelReply(CompletionHandler<void()>&& completionHandler) |
290 | { |
291 | completionHandler(); |
292 | } |
293 | |
294 | void SetLastSeen::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
295 | { |
296 | connection.sendSyncReply(WTFMove(encoder)); |
297 | } |
298 | |
299 | #endif |
300 | |
301 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
302 | |
303 | void SetPrevalentResource::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
304 | { |
305 | completionHandler(); |
306 | } |
307 | |
308 | void SetPrevalentResource::cancelReply(CompletionHandler<void()>&& completionHandler) |
309 | { |
310 | completionHandler(); |
311 | } |
312 | |
313 | void SetPrevalentResource::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
314 | { |
315 | connection.sendSyncReply(WTFMove(encoder)); |
316 | } |
317 | |
318 | #endif |
319 | |
320 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
321 | |
322 | void SetPrevalentResourceForDebugMode::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
323 | { |
324 | completionHandler(); |
325 | } |
326 | |
327 | void SetPrevalentResourceForDebugMode::cancelReply(CompletionHandler<void()>&& completionHandler) |
328 | { |
329 | completionHandler(); |
330 | } |
331 | |
332 | void SetPrevalentResourceForDebugMode::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
333 | { |
334 | connection.sendSyncReply(WTFMove(encoder)); |
335 | } |
336 | |
337 | #endif |
338 | |
339 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
340 | |
341 | void HadUserInteraction::callReply(IPC::Decoder& decoder, CompletionHandler<void(bool&&)>&& completionHandler) |
342 | { |
343 | Optional<bool> hadUserInteraction; |
344 | decoder >> hadUserInteraction; |
345 | if (!hadUserInteraction) { |
346 | ASSERT_NOT_REACHED(); |
347 | cancelReply(WTFMove(completionHandler)); |
348 | return; |
349 | } |
350 | completionHandler(WTFMove(*hadUserInteraction)); |
351 | } |
352 | |
353 | void HadUserInteraction::cancelReply(CompletionHandler<void(bool&&)>&& completionHandler) |
354 | { |
355 | completionHandler(IPC::AsyncReplyError<bool>::create()); |
356 | } |
357 | |
358 | void HadUserInteraction::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, bool hadUserInteraction) |
359 | { |
360 | *encoder << hadUserInteraction; |
361 | connection.sendSyncReply(WTFMove(encoder)); |
362 | } |
363 | |
364 | #endif |
365 | |
366 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
367 | |
368 | void HasLocalStorage::callReply(IPC::Decoder& decoder, CompletionHandler<void(bool&&)>&& completionHandler) |
369 | { |
370 | Optional<bool> hadUserInteraction; |
371 | decoder >> hadUserInteraction; |
372 | if (!hadUserInteraction) { |
373 | ASSERT_NOT_REACHED(); |
374 | cancelReply(WTFMove(completionHandler)); |
375 | return; |
376 | } |
377 | completionHandler(WTFMove(*hadUserInteraction)); |
378 | } |
379 | |
380 | void HasLocalStorage::cancelReply(CompletionHandler<void(bool&&)>&& completionHandler) |
381 | { |
382 | completionHandler(IPC::AsyncReplyError<bool>::create()); |
383 | } |
384 | |
385 | void HasLocalStorage::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, bool hadUserInteraction) |
386 | { |
387 | *encoder << hadUserInteraction; |
388 | connection.sendSyncReply(WTFMove(encoder)); |
389 | } |
390 | |
391 | #endif |
392 | |
393 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
394 | |
395 | void GetAllStorageAccessEntries::callReply(IPC::Decoder& decoder, CompletionHandler<void(Vector<String>&&)>&& completionHandler) |
396 | { |
397 | Optional<Vector<String>> domains; |
398 | decoder >> domains; |
399 | if (!domains) { |
400 | ASSERT_NOT_REACHED(); |
401 | cancelReply(WTFMove(completionHandler)); |
402 | return; |
403 | } |
404 | completionHandler(WTFMove(*domains)); |
405 | } |
406 | |
407 | void GetAllStorageAccessEntries::cancelReply(CompletionHandler<void(Vector<String>&&)>&& completionHandler) |
408 | { |
409 | completionHandler(IPC::AsyncReplyError<Vector<String>>::create()); |
410 | } |
411 | |
412 | void GetAllStorageAccessEntries::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const Vector<String>& domains) |
413 | { |
414 | *encoder << domains; |
415 | connection.sendSyncReply(WTFMove(encoder)); |
416 | } |
417 | |
418 | #endif |
419 | |
420 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
421 | |
422 | void IsRegisteredAsRedirectingTo::callReply(IPC::Decoder& decoder, CompletionHandler<void(bool&&)>&& completionHandler) |
423 | { |
424 | Optional<bool> isRedirectingTo; |
425 | decoder >> isRedirectingTo; |
426 | if (!isRedirectingTo) { |
427 | ASSERT_NOT_REACHED(); |
428 | cancelReply(WTFMove(completionHandler)); |
429 | return; |
430 | } |
431 | completionHandler(WTFMove(*isRedirectingTo)); |
432 | } |
433 | |
434 | void IsRegisteredAsRedirectingTo::cancelReply(CompletionHandler<void(bool&&)>&& completionHandler) |
435 | { |
436 | completionHandler(IPC::AsyncReplyError<bool>::create()); |
437 | } |
438 | |
439 | void IsRegisteredAsRedirectingTo::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, bool isRedirectingTo) |
440 | { |
441 | *encoder << isRedirectingTo; |
442 | connection.sendSyncReply(WTFMove(encoder)); |
443 | } |
444 | |
445 | #endif |
446 | |
447 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
448 | |
449 | void IsRegisteredAsSubFrameUnder::callReply(IPC::Decoder& decoder, CompletionHandler<void(bool&&)>&& completionHandler) |
450 | { |
451 | Optional<bool> isSubframeUnder; |
452 | decoder >> isSubframeUnder; |
453 | if (!isSubframeUnder) { |
454 | ASSERT_NOT_REACHED(); |
455 | cancelReply(WTFMove(completionHandler)); |
456 | return; |
457 | } |
458 | completionHandler(WTFMove(*isSubframeUnder)); |
459 | } |
460 | |
461 | void IsRegisteredAsSubFrameUnder::cancelReply(CompletionHandler<void(bool&&)>&& completionHandler) |
462 | { |
463 | completionHandler(IPC::AsyncReplyError<bool>::create()); |
464 | } |
465 | |
466 | void IsRegisteredAsSubFrameUnder::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, bool isSubframeUnder) |
467 | { |
468 | *encoder << isSubframeUnder; |
469 | connection.sendSyncReply(WTFMove(encoder)); |
470 | } |
471 | |
472 | #endif |
473 | |
474 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
475 | |
476 | void IsRegisteredAsSubresourceUnder::callReply(IPC::Decoder& decoder, CompletionHandler<void(bool&&)>&& completionHandler) |
477 | { |
478 | Optional<bool> isSubresourceUnder; |
479 | decoder >> isSubresourceUnder; |
480 | if (!isSubresourceUnder) { |
481 | ASSERT_NOT_REACHED(); |
482 | cancelReply(WTFMove(completionHandler)); |
483 | return; |
484 | } |
485 | completionHandler(WTFMove(*isSubresourceUnder)); |
486 | } |
487 | |
488 | void IsRegisteredAsSubresourceUnder::cancelReply(CompletionHandler<void(bool&&)>&& completionHandler) |
489 | { |
490 | completionHandler(IPC::AsyncReplyError<bool>::create()); |
491 | } |
492 | |
493 | void IsRegisteredAsSubresourceUnder::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, bool isSubresourceUnder) |
494 | { |
495 | *encoder << isSubresourceUnder; |
496 | connection.sendSyncReply(WTFMove(encoder)); |
497 | } |
498 | |
499 | #endif |
500 | |
501 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
502 | |
503 | void LogUserInteraction::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
504 | { |
505 | completionHandler(); |
506 | } |
507 | |
508 | void LogUserInteraction::cancelReply(CompletionHandler<void()>&& completionHandler) |
509 | { |
510 | completionHandler(); |
511 | } |
512 | |
513 | void LogUserInteraction::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
514 | { |
515 | connection.sendSyncReply(WTFMove(encoder)); |
516 | } |
517 | |
518 | #endif |
519 | |
520 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
521 | |
522 | void ResetParametersToDefaultValues::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
523 | { |
524 | completionHandler(); |
525 | } |
526 | |
527 | void ResetParametersToDefaultValues::cancelReply(CompletionHandler<void()>&& completionHandler) |
528 | { |
529 | completionHandler(); |
530 | } |
531 | |
532 | void ResetParametersToDefaultValues::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
533 | { |
534 | connection.sendSyncReply(WTFMove(encoder)); |
535 | } |
536 | |
537 | #endif |
538 | |
539 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
540 | |
541 | void ScheduleClearInMemoryAndPersistent::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
542 | { |
543 | completionHandler(); |
544 | } |
545 | |
546 | void ScheduleClearInMemoryAndPersistent::cancelReply(CompletionHandler<void()>&& completionHandler) |
547 | { |
548 | completionHandler(); |
549 | } |
550 | |
551 | void ScheduleClearInMemoryAndPersistent::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
552 | { |
553 | connection.sendSyncReply(WTFMove(encoder)); |
554 | } |
555 | |
556 | #endif |
557 | |
558 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
559 | |
560 | void ScheduleCookieBlockingUpdate::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
561 | { |
562 | completionHandler(); |
563 | } |
564 | |
565 | void ScheduleCookieBlockingUpdate::cancelReply(CompletionHandler<void()>&& completionHandler) |
566 | { |
567 | completionHandler(); |
568 | } |
569 | |
570 | void ScheduleCookieBlockingUpdate::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
571 | { |
572 | connection.sendSyncReply(WTFMove(encoder)); |
573 | } |
574 | |
575 | #endif |
576 | |
577 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
578 | |
579 | void ScheduleStatisticsAndDataRecordsProcessing::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
580 | { |
581 | completionHandler(); |
582 | } |
583 | |
584 | void ScheduleStatisticsAndDataRecordsProcessing::cancelReply(CompletionHandler<void()>&& completionHandler) |
585 | { |
586 | completionHandler(); |
587 | } |
588 | |
589 | void ScheduleStatisticsAndDataRecordsProcessing::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
590 | { |
591 | connection.sendSyncReply(WTFMove(encoder)); |
592 | } |
593 | |
594 | #endif |
595 | |
596 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
597 | |
598 | void SubmitTelemetry::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
599 | { |
600 | completionHandler(); |
601 | } |
602 | |
603 | void SubmitTelemetry::cancelReply(CompletionHandler<void()>&& completionHandler) |
604 | { |
605 | completionHandler(); |
606 | } |
607 | |
608 | void SubmitTelemetry::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
609 | { |
610 | connection.sendSyncReply(WTFMove(encoder)); |
611 | } |
612 | |
613 | #endif |
614 | |
615 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
616 | |
617 | void SetCacheMaxAgeCapForPrevalentResources::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
618 | { |
619 | completionHandler(); |
620 | } |
621 | |
622 | void SetCacheMaxAgeCapForPrevalentResources::cancelReply(CompletionHandler<void()>&& completionHandler) |
623 | { |
624 | completionHandler(); |
625 | } |
626 | |
627 | void SetCacheMaxAgeCapForPrevalentResources::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
628 | { |
629 | connection.sendSyncReply(WTFMove(encoder)); |
630 | } |
631 | |
632 | #endif |
633 | |
634 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
635 | |
636 | void SetGrandfathered::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
637 | { |
638 | completionHandler(); |
639 | } |
640 | |
641 | void SetGrandfathered::cancelReply(CompletionHandler<void()>&& completionHandler) |
642 | { |
643 | completionHandler(); |
644 | } |
645 | |
646 | void SetGrandfathered::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
647 | { |
648 | connection.sendSyncReply(WTFMove(encoder)); |
649 | } |
650 | |
651 | #endif |
652 | |
653 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
654 | |
655 | void SetGrandfatheringTime::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
656 | { |
657 | completionHandler(); |
658 | } |
659 | |
660 | void SetGrandfatheringTime::cancelReply(CompletionHandler<void()>&& completionHandler) |
661 | { |
662 | completionHandler(); |
663 | } |
664 | |
665 | void SetGrandfatheringTime::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
666 | { |
667 | connection.sendSyncReply(WTFMove(encoder)); |
668 | } |
669 | |
670 | #endif |
671 | |
672 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
673 | |
674 | void SetMaxStatisticsEntries::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
675 | { |
676 | completionHandler(); |
677 | } |
678 | |
679 | void SetMaxStatisticsEntries::cancelReply(CompletionHandler<void()>&& completionHandler) |
680 | { |
681 | completionHandler(); |
682 | } |
683 | |
684 | void SetMaxStatisticsEntries::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
685 | { |
686 | connection.sendSyncReply(WTFMove(encoder)); |
687 | } |
688 | |
689 | #endif |
690 | |
691 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
692 | |
693 | void SetMinimumTimeBetweenDataRecordsRemoval::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
694 | { |
695 | completionHandler(); |
696 | } |
697 | |
698 | void SetMinimumTimeBetweenDataRecordsRemoval::cancelReply(CompletionHandler<void()>&& completionHandler) |
699 | { |
700 | completionHandler(); |
701 | } |
702 | |
703 | void SetMinimumTimeBetweenDataRecordsRemoval::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
704 | { |
705 | connection.sendSyncReply(WTFMove(encoder)); |
706 | } |
707 | |
708 | #endif |
709 | |
710 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
711 | |
712 | void SetPruneEntriesDownTo::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
713 | { |
714 | completionHandler(); |
715 | } |
716 | |
717 | void SetPruneEntriesDownTo::cancelReply(CompletionHandler<void()>&& completionHandler) |
718 | { |
719 | completionHandler(); |
720 | } |
721 | |
722 | void SetPruneEntriesDownTo::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
723 | { |
724 | connection.sendSyncReply(WTFMove(encoder)); |
725 | } |
726 | |
727 | #endif |
728 | |
729 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
730 | |
731 | void SetShouldClassifyResourcesBeforeDataRecordsRemoval::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
732 | { |
733 | completionHandler(); |
734 | } |
735 | |
736 | void SetShouldClassifyResourcesBeforeDataRecordsRemoval::cancelReply(CompletionHandler<void()>&& completionHandler) |
737 | { |
738 | completionHandler(); |
739 | } |
740 | |
741 | void SetShouldClassifyResourcesBeforeDataRecordsRemoval::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
742 | { |
743 | connection.sendSyncReply(WTFMove(encoder)); |
744 | } |
745 | |
746 | #endif |
747 | |
748 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
749 | |
750 | void SetNotifyPagesWhenDataRecordsWereScanned::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
751 | { |
752 | completionHandler(); |
753 | } |
754 | |
755 | void SetNotifyPagesWhenDataRecordsWereScanned::cancelReply(CompletionHandler<void()>&& completionHandler) |
756 | { |
757 | completionHandler(); |
758 | } |
759 | |
760 | void SetNotifyPagesWhenDataRecordsWereScanned::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
761 | { |
762 | connection.sendSyncReply(WTFMove(encoder)); |
763 | } |
764 | |
765 | #endif |
766 | |
767 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
768 | |
769 | void SetIsRunningResourceLoadStatisticsTest::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
770 | { |
771 | completionHandler(); |
772 | } |
773 | |
774 | void SetIsRunningResourceLoadStatisticsTest::cancelReply(CompletionHandler<void()>&& completionHandler) |
775 | { |
776 | completionHandler(); |
777 | } |
778 | |
779 | void SetIsRunningResourceLoadStatisticsTest::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
780 | { |
781 | connection.sendSyncReply(WTFMove(encoder)); |
782 | } |
783 | |
784 | #endif |
785 | |
786 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
787 | |
788 | void SetNotifyPagesWhenTelemetryWasCaptured::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
789 | { |
790 | completionHandler(); |
791 | } |
792 | |
793 | void SetNotifyPagesWhenTelemetryWasCaptured::cancelReply(CompletionHandler<void()>&& completionHandler) |
794 | { |
795 | completionHandler(); |
796 | } |
797 | |
798 | void SetNotifyPagesWhenTelemetryWasCaptured::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
799 | { |
800 | connection.sendSyncReply(WTFMove(encoder)); |
801 | } |
802 | |
803 | #endif |
804 | |
805 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
806 | |
807 | void SetResourceLoadStatisticsDebugMode::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
808 | { |
809 | completionHandler(); |
810 | } |
811 | |
812 | void SetResourceLoadStatisticsDebugMode::cancelReply(CompletionHandler<void()>&& completionHandler) |
813 | { |
814 | completionHandler(); |
815 | } |
816 | |
817 | void SetResourceLoadStatisticsDebugMode::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
818 | { |
819 | connection.sendSyncReply(WTFMove(encoder)); |
820 | } |
821 | |
822 | #endif |
823 | |
824 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
825 | |
826 | void SetVeryPrevalentResource::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
827 | { |
828 | completionHandler(); |
829 | } |
830 | |
831 | void SetVeryPrevalentResource::cancelReply(CompletionHandler<void()>&& completionHandler) |
832 | { |
833 | completionHandler(); |
834 | } |
835 | |
836 | void SetVeryPrevalentResource::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
837 | { |
838 | connection.sendSyncReply(WTFMove(encoder)); |
839 | } |
840 | |
841 | #endif |
842 | |
843 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
844 | |
845 | void SetSubframeUnderTopFrameDomain::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
846 | { |
847 | completionHandler(); |
848 | } |
849 | |
850 | void SetSubframeUnderTopFrameDomain::cancelReply(CompletionHandler<void()>&& completionHandler) |
851 | { |
852 | completionHandler(); |
853 | } |
854 | |
855 | void SetSubframeUnderTopFrameDomain::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
856 | { |
857 | connection.sendSyncReply(WTFMove(encoder)); |
858 | } |
859 | |
860 | #endif |
861 | |
862 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
863 | |
864 | void SetSubresourceUnderTopFrameDomain::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
865 | { |
866 | completionHandler(); |
867 | } |
868 | |
869 | void SetSubresourceUnderTopFrameDomain::cancelReply(CompletionHandler<void()>&& completionHandler) |
870 | { |
871 | completionHandler(); |
872 | } |
873 | |
874 | void SetSubresourceUnderTopFrameDomain::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
875 | { |
876 | connection.sendSyncReply(WTFMove(encoder)); |
877 | } |
878 | |
879 | #endif |
880 | |
881 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
882 | |
883 | void SetSubresourceUniqueRedirectTo::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
884 | { |
885 | completionHandler(); |
886 | } |
887 | |
888 | void SetSubresourceUniqueRedirectTo::cancelReply(CompletionHandler<void()>&& completionHandler) |
889 | { |
890 | completionHandler(); |
891 | } |
892 | |
893 | void SetSubresourceUniqueRedirectTo::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
894 | { |
895 | connection.sendSyncReply(WTFMove(encoder)); |
896 | } |
897 | |
898 | #endif |
899 | |
900 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
901 | |
902 | void SetSubresourceUniqueRedirectFrom::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
903 | { |
904 | completionHandler(); |
905 | } |
906 | |
907 | void SetSubresourceUniqueRedirectFrom::cancelReply(CompletionHandler<void()>&& completionHandler) |
908 | { |
909 | completionHandler(); |
910 | } |
911 | |
912 | void SetSubresourceUniqueRedirectFrom::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
913 | { |
914 | connection.sendSyncReply(WTFMove(encoder)); |
915 | } |
916 | |
917 | #endif |
918 | |
919 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
920 | |
921 | void SetTimeToLiveUserInteraction::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
922 | { |
923 | completionHandler(); |
924 | } |
925 | |
926 | void SetTimeToLiveUserInteraction::cancelReply(CompletionHandler<void()>&& completionHandler) |
927 | { |
928 | completionHandler(); |
929 | } |
930 | |
931 | void SetTimeToLiveUserInteraction::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
932 | { |
933 | connection.sendSyncReply(WTFMove(encoder)); |
934 | } |
935 | |
936 | #endif |
937 | |
938 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
939 | |
940 | void SetTopFrameUniqueRedirectTo::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
941 | { |
942 | completionHandler(); |
943 | } |
944 | |
945 | void SetTopFrameUniqueRedirectTo::cancelReply(CompletionHandler<void()>&& completionHandler) |
946 | { |
947 | completionHandler(); |
948 | } |
949 | |
950 | void SetTopFrameUniqueRedirectTo::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
951 | { |
952 | connection.sendSyncReply(WTFMove(encoder)); |
953 | } |
954 | |
955 | #endif |
956 | |
957 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
958 | |
959 | void SetTopFrameUniqueRedirectFrom::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
960 | { |
961 | completionHandler(); |
962 | } |
963 | |
964 | void SetTopFrameUniqueRedirectFrom::cancelReply(CompletionHandler<void()>&& completionHandler) |
965 | { |
966 | completionHandler(); |
967 | } |
968 | |
969 | void SetTopFrameUniqueRedirectFrom::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
970 | { |
971 | connection.sendSyncReply(WTFMove(encoder)); |
972 | } |
973 | |
974 | #endif |
975 | |
976 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
977 | |
978 | void ResetCacheMaxAgeCapForPrevalentResources::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
979 | { |
980 | completionHandler(); |
981 | } |
982 | |
983 | void ResetCacheMaxAgeCapForPrevalentResources::cancelReply(CompletionHandler<void()>&& completionHandler) |
984 | { |
985 | completionHandler(); |
986 | } |
987 | |
988 | void ResetCacheMaxAgeCapForPrevalentResources::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
989 | { |
990 | connection.sendSyncReply(WTFMove(encoder)); |
991 | } |
992 | |
993 | #endif |
994 | |
995 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
996 | |
997 | void SetCrossSiteLoadWithLinkDecorationForTesting::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
998 | { |
999 | completionHandler(); |
1000 | } |
1001 | |
1002 | void SetCrossSiteLoadWithLinkDecorationForTesting::cancelReply(CompletionHandler<void()>&& completionHandler) |
1003 | { |
1004 | completionHandler(); |
1005 | } |
1006 | |
1007 | void SetCrossSiteLoadWithLinkDecorationForTesting::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
1008 | { |
1009 | connection.sendSyncReply(WTFMove(encoder)); |
1010 | } |
1011 | |
1012 | #endif |
1013 | |
1014 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1015 | |
1016 | void ResetCrossSiteLoadsWithLinkDecorationForTesting::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
1017 | { |
1018 | completionHandler(); |
1019 | } |
1020 | |
1021 | void ResetCrossSiteLoadsWithLinkDecorationForTesting::cancelReply(CompletionHandler<void()>&& completionHandler) |
1022 | { |
1023 | completionHandler(); |
1024 | } |
1025 | |
1026 | void ResetCrossSiteLoadsWithLinkDecorationForTesting::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
1027 | { |
1028 | connection.sendSyncReply(WTFMove(encoder)); |
1029 | } |
1030 | |
1031 | #endif |
1032 | |
1033 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1034 | |
1035 | void DeleteCookiesForTesting::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
1036 | { |
1037 | completionHandler(); |
1038 | } |
1039 | |
1040 | void DeleteCookiesForTesting::cancelReply(CompletionHandler<void()>&& completionHandler) |
1041 | { |
1042 | completionHandler(); |
1043 | } |
1044 | |
1045 | void DeleteCookiesForTesting::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
1046 | { |
1047 | connection.sendSyncReply(WTFMove(encoder)); |
1048 | } |
1049 | |
1050 | #endif |
1051 | |
1052 | void DumpAdClickAttribution::callReply(IPC::Decoder& decoder, CompletionHandler<void(String&&)>&& completionHandler) |
1053 | { |
1054 | Optional<String> adClickAttributionState; |
1055 | decoder >> adClickAttributionState; |
1056 | if (!adClickAttributionState) { |
1057 | ASSERT_NOT_REACHED(); |
1058 | cancelReply(WTFMove(completionHandler)); |
1059 | return; |
1060 | } |
1061 | completionHandler(WTFMove(*adClickAttributionState)); |
1062 | } |
1063 | |
1064 | void DumpAdClickAttribution::cancelReply(CompletionHandler<void(String&&)>&& completionHandler) |
1065 | { |
1066 | completionHandler(IPC::AsyncReplyError<String>::create()); |
1067 | } |
1068 | |
1069 | void DumpAdClickAttribution::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const String& adClickAttributionState) |
1070 | { |
1071 | *encoder << adClickAttributionState; |
1072 | connection.sendSyncReply(WTFMove(encoder)); |
1073 | } |
1074 | |
1075 | void ClearAdClickAttribution::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
1076 | { |
1077 | completionHandler(); |
1078 | } |
1079 | |
1080 | void ClearAdClickAttribution::cancelReply(CompletionHandler<void()>&& completionHandler) |
1081 | { |
1082 | completionHandler(); |
1083 | } |
1084 | |
1085 | void ClearAdClickAttribution::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
1086 | { |
1087 | connection.sendSyncReply(WTFMove(encoder)); |
1088 | } |
1089 | |
1090 | void SetAdClickAttributionOverrideTimerForTesting::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
1091 | { |
1092 | completionHandler(); |
1093 | } |
1094 | |
1095 | void SetAdClickAttributionOverrideTimerForTesting::cancelReply(CompletionHandler<void()>&& completionHandler) |
1096 | { |
1097 | completionHandler(); |
1098 | } |
1099 | |
1100 | void SetAdClickAttributionOverrideTimerForTesting::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
1101 | { |
1102 | connection.sendSyncReply(WTFMove(encoder)); |
1103 | } |
1104 | |
1105 | void SetAdClickAttributionConversionURLForTesting::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
1106 | { |
1107 | completionHandler(); |
1108 | } |
1109 | |
1110 | void SetAdClickAttributionConversionURLForTesting::cancelReply(CompletionHandler<void()>&& completionHandler) |
1111 | { |
1112 | completionHandler(); |
1113 | } |
1114 | |
1115 | void SetAdClickAttributionConversionURLForTesting::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
1116 | { |
1117 | connection.sendSyncReply(WTFMove(encoder)); |
1118 | } |
1119 | |
1120 | void MarkAdClickAttributionsAsExpiredForTesting::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
1121 | { |
1122 | completionHandler(); |
1123 | } |
1124 | |
1125 | void MarkAdClickAttributionsAsExpiredForTesting::cancelReply(CompletionHandler<void()>&& completionHandler) |
1126 | { |
1127 | completionHandler(); |
1128 | } |
1129 | |
1130 | void MarkAdClickAttributionsAsExpiredForTesting::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
1131 | { |
1132 | connection.sendSyncReply(WTFMove(encoder)); |
1133 | } |
1134 | |
1135 | void OriginsWithPersistentCredentials::callReply(IPC::Decoder& decoder, CompletionHandler<void(Vector<WebCore::SecurityOriginData>&&)>&& completionHandler) |
1136 | { |
1137 | Optional<Vector<WebCore::SecurityOriginData>> origins; |
1138 | decoder >> origins; |
1139 | if (!origins) { |
1140 | ASSERT_NOT_REACHED(); |
1141 | cancelReply(WTFMove(completionHandler)); |
1142 | return; |
1143 | } |
1144 | completionHandler(WTFMove(*origins)); |
1145 | } |
1146 | |
1147 | void OriginsWithPersistentCredentials::cancelReply(CompletionHandler<void(Vector<WebCore::SecurityOriginData>&&)>&& completionHandler) |
1148 | { |
1149 | completionHandler(IPC::AsyncReplyError<Vector<WebCore::SecurityOriginData>>::create()); |
1150 | } |
1151 | |
1152 | void OriginsWithPersistentCredentials::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const Vector<WebCore::SecurityOriginData>& origins) |
1153 | { |
1154 | *encoder << origins; |
1155 | connection.sendSyncReply(WTFMove(encoder)); |
1156 | } |
1157 | |
1158 | void RemoveCredentialsWithOrigins::callReply(IPC::Decoder& decoder, CompletionHandler<void()>&& completionHandler) |
1159 | { |
1160 | completionHandler(); |
1161 | } |
1162 | |
1163 | void RemoveCredentialsWithOrigins::cancelReply(CompletionHandler<void()>&& completionHandler) |
1164 | { |
1165 | completionHandler(); |
1166 | } |
1167 | |
1168 | void RemoveCredentialsWithOrigins::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection) |
1169 | { |
1170 | connection.sendSyncReply(WTFMove(encoder)); |
1171 | } |
1172 | |
1173 | void GetLocalStorageOriginDetails::callReply(IPC::Decoder& decoder, CompletionHandler<void(Vector<WebKit::LocalStorageDatabaseTracker::OriginDetails>&&)>&& completionHandler) |
1174 | { |
1175 | Optional<Vector<WebKit::LocalStorageDatabaseTracker::OriginDetails>> details; |
1176 | decoder >> details; |
1177 | if (!details) { |
1178 | ASSERT_NOT_REACHED(); |
1179 | cancelReply(WTFMove(completionHandler)); |
1180 | return; |
1181 | } |
1182 | completionHandler(WTFMove(*details)); |
1183 | } |
1184 | |
1185 | void GetLocalStorageOriginDetails::cancelReply(CompletionHandler<void(Vector<WebKit::LocalStorageDatabaseTracker::OriginDetails>&&)>&& completionHandler) |
1186 | { |
1187 | completionHandler(IPC::AsyncReplyError<Vector<WebKit::LocalStorageDatabaseTracker::OriginDetails>>::create()); |
1188 | } |
1189 | |
1190 | void GetLocalStorageOriginDetails::send(std::unique_ptr<IPC::Encoder>&& encoder, IPC::Connection& connection, const Vector<WebKit::LocalStorageDatabaseTracker::OriginDetails>& details) |
1191 | { |
1192 | *encoder << details; |
1193 | connection.sendSyncReply(WTFMove(encoder)); |
1194 | } |
1195 | |
1196 | } // namespace NetworkProcess |
1197 | |
1198 | } // namespace Messages |
1199 | |
1200 | namespace WebKit { |
1201 | |
1202 | void NetworkProcess::didReceiveNetworkProcessMessage(IPC::Connection& connection, IPC::Decoder& decoder) |
1203 | { |
1204 | if (decoder.messageName() == Messages::NetworkProcess::InitializeNetworkProcess::name()) { |
1205 | IPC::handleMessage<Messages::NetworkProcess::InitializeNetworkProcess>(decoder, this, &NetworkProcess::initializeNetworkProcess); |
1206 | return; |
1207 | } |
1208 | if (decoder.messageName() == Messages::NetworkProcess::CreateNetworkConnectionToWebProcess::name()) { |
1209 | IPC::handleMessage<Messages::NetworkProcess::CreateNetworkConnectionToWebProcess>(decoder, this, &NetworkProcess::createNetworkConnectionToWebProcess); |
1210 | return; |
1211 | } |
1212 | #if USE(SOUP) |
1213 | if (decoder.messageName() == Messages::NetworkProcess::SetIgnoreTLSErrors::name()) { |
1214 | IPC::handleMessage<Messages::NetworkProcess::SetIgnoreTLSErrors>(decoder, this, &NetworkProcess::setIgnoreTLSErrors); |
1215 | return; |
1216 | } |
1217 | #endif |
1218 | #if USE(SOUP) |
1219 | if (decoder.messageName() == Messages::NetworkProcess::UserPreferredLanguagesChanged::name()) { |
1220 | IPC::handleMessage<Messages::NetworkProcess::UserPreferredLanguagesChanged>(decoder, this, &NetworkProcess::userPreferredLanguagesChanged); |
1221 | return; |
1222 | } |
1223 | #endif |
1224 | #if USE(SOUP) |
1225 | if (decoder.messageName() == Messages::NetworkProcess::SetNetworkProxySettings::name()) { |
1226 | IPC::handleMessage<Messages::NetworkProcess::SetNetworkProxySettings>(decoder, this, &NetworkProcess::setNetworkProxySettings); |
1227 | return; |
1228 | } |
1229 | #endif |
1230 | #if USE(CURL) |
1231 | if (decoder.messageName() == Messages::NetworkProcess::SetNetworkProxySettings::name()) { |
1232 | IPC::handleMessage<Messages::NetworkProcess::SetNetworkProxySettings>(decoder, this, &NetworkProcess::setNetworkProxySettings); |
1233 | return; |
1234 | } |
1235 | #endif |
1236 | if (decoder.messageName() == Messages::NetworkProcess::ClearCachedCredentials::name()) { |
1237 | IPC::handleMessage<Messages::NetworkProcess::ClearCachedCredentials>(decoder, this, &NetworkProcess::clearCachedCredentials); |
1238 | return; |
1239 | } |
1240 | if (decoder.messageName() == Messages::NetworkProcess::AddWebsiteDataStore::name()) { |
1241 | IPC::handleMessage<Messages::NetworkProcess::AddWebsiteDataStore>(decoder, this, &NetworkProcess::addWebsiteDataStore); |
1242 | return; |
1243 | } |
1244 | if (decoder.messageName() == Messages::NetworkProcess::DestroySession::name()) { |
1245 | IPC::handleMessage<Messages::NetworkProcess::DestroySession>(decoder, this, &NetworkProcess::destroySession); |
1246 | return; |
1247 | } |
1248 | if (decoder.messageName() == Messages::NetworkProcess::FetchWebsiteData::name()) { |
1249 | IPC::handleMessage<Messages::NetworkProcess::FetchWebsiteData>(decoder, this, &NetworkProcess::fetchWebsiteData); |
1250 | return; |
1251 | } |
1252 | if (decoder.messageName() == Messages::NetworkProcess::DeleteWebsiteData::name()) { |
1253 | IPC::handleMessage<Messages::NetworkProcess::DeleteWebsiteData>(decoder, this, &NetworkProcess::deleteWebsiteData); |
1254 | return; |
1255 | } |
1256 | if (decoder.messageName() == Messages::NetworkProcess::DeleteWebsiteDataForOrigins::name()) { |
1257 | IPC::handleMessage<Messages::NetworkProcess::DeleteWebsiteDataForOrigins>(decoder, this, &NetworkProcess::deleteWebsiteDataForOrigins); |
1258 | return; |
1259 | } |
1260 | if (decoder.messageName() == Messages::NetworkProcess::DownloadRequest::name()) { |
1261 | IPC::handleMessage<Messages::NetworkProcess::DownloadRequest>(decoder, this, &NetworkProcess::downloadRequest); |
1262 | return; |
1263 | } |
1264 | if (decoder.messageName() == Messages::NetworkProcess::ResumeDownload::name()) { |
1265 | IPC::handleMessage<Messages::NetworkProcess::ResumeDownload>(decoder, this, &NetworkProcess::resumeDownload); |
1266 | return; |
1267 | } |
1268 | if (decoder.messageName() == Messages::NetworkProcess::CancelDownload::name()) { |
1269 | IPC::handleMessage<Messages::NetworkProcess::CancelDownload>(decoder, this, &NetworkProcess::cancelDownload); |
1270 | return; |
1271 | } |
1272 | #if PLATFORM(COCOA) |
1273 | if (decoder.messageName() == Messages::NetworkProcess::PublishDownloadProgress::name()) { |
1274 | IPC::handleMessage<Messages::NetworkProcess::PublishDownloadProgress>(decoder, this, &NetworkProcess::publishDownloadProgress); |
1275 | return; |
1276 | } |
1277 | #endif |
1278 | if (decoder.messageName() == Messages::NetworkProcess::ApplicationDidEnterBackground::name()) { |
1279 | IPC::handleMessage<Messages::NetworkProcess::ApplicationDidEnterBackground>(decoder, this, &NetworkProcess::applicationDidEnterBackground); |
1280 | return; |
1281 | } |
1282 | if (decoder.messageName() == Messages::NetworkProcess::ApplicationWillEnterForeground::name()) { |
1283 | IPC::handleMessage<Messages::NetworkProcess::ApplicationWillEnterForeground>(decoder, this, &NetworkProcess::applicationWillEnterForeground); |
1284 | return; |
1285 | } |
1286 | if (decoder.messageName() == Messages::NetworkProcess::ContinueWillSendRequest::name()) { |
1287 | IPC::handleMessage<Messages::NetworkProcess::ContinueWillSendRequest>(decoder, this, &NetworkProcess::continueWillSendRequest); |
1288 | return; |
1289 | } |
1290 | if (decoder.messageName() == Messages::NetworkProcess::ContinueDecidePendingDownloadDestination::name()) { |
1291 | IPC::handleMessage<Messages::NetworkProcess::ContinueDecidePendingDownloadDestination>(decoder, this, &NetworkProcess::continueDecidePendingDownloadDestination); |
1292 | return; |
1293 | } |
1294 | #if PLATFORM(COCOA) |
1295 | if (decoder.messageName() == Messages::NetworkProcess::SetQOS::name()) { |
1296 | IPC::handleMessage<Messages::NetworkProcess::SetQOS>(decoder, this, &NetworkProcess::setQOS); |
1297 | return; |
1298 | } |
1299 | #endif |
1300 | #if PLATFORM(COCOA) |
1301 | if (decoder.messageName() == Messages::NetworkProcess::SetStorageAccessAPIEnabled::name()) { |
1302 | IPC::handleMessage<Messages::NetworkProcess::SetStorageAccessAPIEnabled>(decoder, this, &NetworkProcess::setStorageAccessAPIEnabled); |
1303 | return; |
1304 | } |
1305 | #endif |
1306 | if (decoder.messageName() == Messages::NetworkProcess::SyncAllCookies::name()) { |
1307 | IPC::handleMessage<Messages::NetworkProcess::SyncAllCookies>(decoder, this, &NetworkProcess::syncAllCookies); |
1308 | return; |
1309 | } |
1310 | if (decoder.messageName() == Messages::NetworkProcess::AllowSpecificHTTPSCertificateForHost::name()) { |
1311 | IPC::handleMessage<Messages::NetworkProcess::AllowSpecificHTTPSCertificateForHost>(decoder, this, &NetworkProcess::allowSpecificHTTPSCertificateForHost); |
1312 | return; |
1313 | } |
1314 | if (decoder.messageName() == Messages::NetworkProcess::SetCanHandleHTTPSServerTrustEvaluation::name()) { |
1315 | IPC::handleMessage<Messages::NetworkProcess::SetCanHandleHTTPSServerTrustEvaluation>(decoder, this, &NetworkProcess::setCanHandleHTTPSServerTrustEvaluation); |
1316 | return; |
1317 | } |
1318 | if (decoder.messageName() == Messages::NetworkProcess::GetNetworkProcessStatistics::name()) { |
1319 | IPC::handleMessage<Messages::NetworkProcess::GetNetworkProcessStatistics>(decoder, this, &NetworkProcess::getNetworkProcessStatistics); |
1320 | return; |
1321 | } |
1322 | if (decoder.messageName() == Messages::NetworkProcess::ClearCacheForAllOrigins::name()) { |
1323 | IPC::handleMessage<Messages::NetworkProcess::ClearCacheForAllOrigins>(decoder, this, &NetworkProcess::clearCacheForAllOrigins); |
1324 | return; |
1325 | } |
1326 | if (decoder.messageName() == Messages::NetworkProcess::SetCacheModel::name()) { |
1327 | IPC::handleMessage<Messages::NetworkProcess::SetCacheModel>(decoder, this, &NetworkProcess::setCacheModel); |
1328 | return; |
1329 | } |
1330 | if (decoder.messageName() == Messages::NetworkProcess::ProcessDidTransitionToBackground::name()) { |
1331 | IPC::handleMessage<Messages::NetworkProcess::ProcessDidTransitionToBackground>(decoder, this, &NetworkProcess::processDidTransitionToBackground); |
1332 | return; |
1333 | } |
1334 | if (decoder.messageName() == Messages::NetworkProcess::ProcessDidTransitionToForeground::name()) { |
1335 | IPC::handleMessage<Messages::NetworkProcess::ProcessDidTransitionToForeground>(decoder, this, &NetworkProcess::processDidTransitionToForeground); |
1336 | return; |
1337 | } |
1338 | if (decoder.messageName() == Messages::NetworkProcess::ProcessWillSuspendImminently::name()) { |
1339 | IPC::handleMessage<Messages::NetworkProcess::ProcessWillSuspendImminently>(decoder, this, &NetworkProcess::processWillSuspendImminently); |
1340 | return; |
1341 | } |
1342 | if (decoder.messageName() == Messages::NetworkProcess::PrepareToSuspend::name()) { |
1343 | IPC::handleMessage<Messages::NetworkProcess::PrepareToSuspend>(decoder, this, &NetworkProcess::prepareToSuspend); |
1344 | return; |
1345 | } |
1346 | if (decoder.messageName() == Messages::NetworkProcess::CancelPrepareToSuspend::name()) { |
1347 | IPC::handleMessage<Messages::NetworkProcess::CancelPrepareToSuspend>(decoder, this, &NetworkProcess::cancelPrepareToSuspend); |
1348 | return; |
1349 | } |
1350 | if (decoder.messageName() == Messages::NetworkProcess::ProcessDidResume::name()) { |
1351 | IPC::handleMessage<Messages::NetworkProcess::ProcessDidResume>(decoder, this, &NetworkProcess::processDidResume); |
1352 | return; |
1353 | } |
1354 | if (decoder.messageName() == Messages::NetworkProcess::PreconnectTo::name()) { |
1355 | IPC::handleMessage<Messages::NetworkProcess::PreconnectTo>(decoder, this, &NetworkProcess::preconnectTo); |
1356 | return; |
1357 | } |
1358 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1359 | if (decoder.messageName() == Messages::NetworkProcess::ClearPrevalentResource::name()) { |
1360 | IPC::handleMessageAsync<Messages::NetworkProcess::ClearPrevalentResource>(connection, decoder, this, &NetworkProcess::clearPrevalentResource); |
1361 | return; |
1362 | } |
1363 | #endif |
1364 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1365 | if (decoder.messageName() == Messages::NetworkProcess::ClearUserInteraction::name()) { |
1366 | IPC::handleMessageAsync<Messages::NetworkProcess::ClearUserInteraction>(connection, decoder, this, &NetworkProcess::clearUserInteraction); |
1367 | return; |
1368 | } |
1369 | #endif |
1370 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1371 | if (decoder.messageName() == Messages::NetworkProcess::DumpResourceLoadStatistics::name()) { |
1372 | IPC::handleMessageAsync<Messages::NetworkProcess::DumpResourceLoadStatistics>(connection, decoder, this, &NetworkProcess::dumpResourceLoadStatistics); |
1373 | return; |
1374 | } |
1375 | #endif |
1376 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1377 | if (decoder.messageName() == Messages::NetworkProcess::SetResourceLoadStatisticsEnabled::name()) { |
1378 | IPC::handleMessage<Messages::NetworkProcess::SetResourceLoadStatisticsEnabled>(decoder, this, &NetworkProcess::setResourceLoadStatisticsEnabled); |
1379 | return; |
1380 | } |
1381 | #endif |
1382 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1383 | if (decoder.messageName() == Messages::NetworkProcess::UpdatePrevalentDomainsToBlockCookiesFor::name()) { |
1384 | IPC::handleMessageAsync<Messages::NetworkProcess::UpdatePrevalentDomainsToBlockCookiesFor>(connection, decoder, this, &NetworkProcess::updatePrevalentDomainsToBlockCookiesFor); |
1385 | return; |
1386 | } |
1387 | #endif |
1388 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1389 | if (decoder.messageName() == Messages::NetworkProcess::IsGrandfathered::name()) { |
1390 | IPC::handleMessageAsync<Messages::NetworkProcess::IsGrandfathered>(connection, decoder, this, &NetworkProcess::isGrandfathered); |
1391 | return; |
1392 | } |
1393 | #endif |
1394 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1395 | if (decoder.messageName() == Messages::NetworkProcess::IsPrevalentResource::name()) { |
1396 | IPC::handleMessageAsync<Messages::NetworkProcess::IsPrevalentResource>(connection, decoder, this, &NetworkProcess::isPrevalentResource); |
1397 | return; |
1398 | } |
1399 | #endif |
1400 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1401 | if (decoder.messageName() == Messages::NetworkProcess::IsVeryPrevalentResource::name()) { |
1402 | IPC::handleMessageAsync<Messages::NetworkProcess::IsVeryPrevalentResource>(connection, decoder, this, &NetworkProcess::isVeryPrevalentResource); |
1403 | return; |
1404 | } |
1405 | #endif |
1406 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1407 | if (decoder.messageName() == Messages::NetworkProcess::SetAgeCapForClientSideCookies::name()) { |
1408 | IPC::handleMessageAsync<Messages::NetworkProcess::SetAgeCapForClientSideCookies>(connection, decoder, this, &NetworkProcess::setAgeCapForClientSideCookies); |
1409 | return; |
1410 | } |
1411 | #endif |
1412 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1413 | if (decoder.messageName() == Messages::NetworkProcess::SetLastSeen::name()) { |
1414 | IPC::handleMessageAsync<Messages::NetworkProcess::SetLastSeen>(connection, decoder, this, &NetworkProcess::setLastSeen); |
1415 | return; |
1416 | } |
1417 | #endif |
1418 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1419 | if (decoder.messageName() == Messages::NetworkProcess::SetPrevalentResource::name()) { |
1420 | IPC::handleMessageAsync<Messages::NetworkProcess::SetPrevalentResource>(connection, decoder, this, &NetworkProcess::setPrevalentResource); |
1421 | return; |
1422 | } |
1423 | #endif |
1424 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1425 | if (decoder.messageName() == Messages::NetworkProcess::SetPrevalentResourceForDebugMode::name()) { |
1426 | IPC::handleMessageAsync<Messages::NetworkProcess::SetPrevalentResourceForDebugMode>(connection, decoder, this, &NetworkProcess::setPrevalentResourceForDebugMode); |
1427 | return; |
1428 | } |
1429 | #endif |
1430 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1431 | if (decoder.messageName() == Messages::NetworkProcess::HadUserInteraction::name()) { |
1432 | IPC::handleMessageAsync<Messages::NetworkProcess::HadUserInteraction>(connection, decoder, this, &NetworkProcess::hadUserInteraction); |
1433 | return; |
1434 | } |
1435 | #endif |
1436 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1437 | if (decoder.messageName() == Messages::NetworkProcess::HasLocalStorage::name()) { |
1438 | IPC::handleMessageAsync<Messages::NetworkProcess::HasLocalStorage>(connection, decoder, this, &NetworkProcess::hasLocalStorage); |
1439 | return; |
1440 | } |
1441 | #endif |
1442 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1443 | if (decoder.messageName() == Messages::NetworkProcess::GetAllStorageAccessEntries::name()) { |
1444 | IPC::handleMessageAsync<Messages::NetworkProcess::GetAllStorageAccessEntries>(connection, decoder, this, &NetworkProcess::getAllStorageAccessEntries); |
1445 | return; |
1446 | } |
1447 | #endif |
1448 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1449 | if (decoder.messageName() == Messages::NetworkProcess::IsRegisteredAsRedirectingTo::name()) { |
1450 | IPC::handleMessageAsync<Messages::NetworkProcess::IsRegisteredAsRedirectingTo>(connection, decoder, this, &NetworkProcess::isRegisteredAsRedirectingTo); |
1451 | return; |
1452 | } |
1453 | #endif |
1454 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1455 | if (decoder.messageName() == Messages::NetworkProcess::IsRegisteredAsSubFrameUnder::name()) { |
1456 | IPC::handleMessageAsync<Messages::NetworkProcess::IsRegisteredAsSubFrameUnder>(connection, decoder, this, &NetworkProcess::isRegisteredAsSubFrameUnder); |
1457 | return; |
1458 | } |
1459 | #endif |
1460 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1461 | if (decoder.messageName() == Messages::NetworkProcess::IsRegisteredAsSubresourceUnder::name()) { |
1462 | IPC::handleMessageAsync<Messages::NetworkProcess::IsRegisteredAsSubresourceUnder>(connection, decoder, this, &NetworkProcess::isRegisteredAsSubresourceUnder); |
1463 | return; |
1464 | } |
1465 | #endif |
1466 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1467 | if (decoder.messageName() == Messages::NetworkProcess::LogFrameNavigation::name()) { |
1468 | IPC::handleMessage<Messages::NetworkProcess::LogFrameNavigation>(decoder, this, &NetworkProcess::logFrameNavigation); |
1469 | return; |
1470 | } |
1471 | #endif |
1472 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1473 | if (decoder.messageName() == Messages::NetworkProcess::LogUserInteraction::name()) { |
1474 | IPC::handleMessageAsync<Messages::NetworkProcess::LogUserInteraction>(connection, decoder, this, &NetworkProcess::logUserInteraction); |
1475 | return; |
1476 | } |
1477 | #endif |
1478 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1479 | if (decoder.messageName() == Messages::NetworkProcess::RemovePrevalentDomains::name()) { |
1480 | IPC::handleMessage<Messages::NetworkProcess::RemovePrevalentDomains>(decoder, this, &NetworkProcess::removePrevalentDomains); |
1481 | return; |
1482 | } |
1483 | #endif |
1484 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1485 | if (decoder.messageName() == Messages::NetworkProcess::ResetParametersToDefaultValues::name()) { |
1486 | IPC::handleMessageAsync<Messages::NetworkProcess::ResetParametersToDefaultValues>(connection, decoder, this, &NetworkProcess::resetParametersToDefaultValues); |
1487 | return; |
1488 | } |
1489 | #endif |
1490 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1491 | if (decoder.messageName() == Messages::NetworkProcess::ScheduleClearInMemoryAndPersistent::name()) { |
1492 | IPC::handleMessageAsync<Messages::NetworkProcess::ScheduleClearInMemoryAndPersistent>(connection, decoder, this, &NetworkProcess::scheduleClearInMemoryAndPersistent); |
1493 | return; |
1494 | } |
1495 | #endif |
1496 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1497 | if (decoder.messageName() == Messages::NetworkProcess::ScheduleCookieBlockingUpdate::name()) { |
1498 | IPC::handleMessageAsync<Messages::NetworkProcess::ScheduleCookieBlockingUpdate>(connection, decoder, this, &NetworkProcess::scheduleCookieBlockingUpdate); |
1499 | return; |
1500 | } |
1501 | #endif |
1502 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1503 | if (decoder.messageName() == Messages::NetworkProcess::ScheduleStatisticsAndDataRecordsProcessing::name()) { |
1504 | IPC::handleMessageAsync<Messages::NetworkProcess::ScheduleStatisticsAndDataRecordsProcessing>(connection, decoder, this, &NetworkProcess::scheduleStatisticsAndDataRecordsProcessing); |
1505 | return; |
1506 | } |
1507 | #endif |
1508 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1509 | if (decoder.messageName() == Messages::NetworkProcess::SubmitTelemetry::name()) { |
1510 | IPC::handleMessageAsync<Messages::NetworkProcess::SubmitTelemetry>(connection, decoder, this, &NetworkProcess::submitTelemetry); |
1511 | return; |
1512 | } |
1513 | #endif |
1514 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1515 | if (decoder.messageName() == Messages::NetworkProcess::SetCacheMaxAgeCapForPrevalentResources::name()) { |
1516 | IPC::handleMessageAsync<Messages::NetworkProcess::SetCacheMaxAgeCapForPrevalentResources>(connection, decoder, this, &NetworkProcess::setCacheMaxAgeCapForPrevalentResources); |
1517 | return; |
1518 | } |
1519 | #endif |
1520 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1521 | if (decoder.messageName() == Messages::NetworkProcess::SetGrandfathered::name()) { |
1522 | IPC::handleMessageAsync<Messages::NetworkProcess::SetGrandfathered>(connection, decoder, this, &NetworkProcess::setGrandfathered); |
1523 | return; |
1524 | } |
1525 | #endif |
1526 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1527 | if (decoder.messageName() == Messages::NetworkProcess::SetGrandfatheringTime::name()) { |
1528 | IPC::handleMessageAsync<Messages::NetworkProcess::SetGrandfatheringTime>(connection, decoder, this, &NetworkProcess::setGrandfatheringTime); |
1529 | return; |
1530 | } |
1531 | #endif |
1532 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1533 | if (decoder.messageName() == Messages::NetworkProcess::SetMaxStatisticsEntries::name()) { |
1534 | IPC::handleMessageAsync<Messages::NetworkProcess::SetMaxStatisticsEntries>(connection, decoder, this, &NetworkProcess::setMaxStatisticsEntries); |
1535 | return; |
1536 | } |
1537 | #endif |
1538 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1539 | if (decoder.messageName() == Messages::NetworkProcess::SetMinimumTimeBetweenDataRecordsRemoval::name()) { |
1540 | IPC::handleMessageAsync<Messages::NetworkProcess::SetMinimumTimeBetweenDataRecordsRemoval>(connection, decoder, this, &NetworkProcess::setMinimumTimeBetweenDataRecordsRemoval); |
1541 | return; |
1542 | } |
1543 | #endif |
1544 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1545 | if (decoder.messageName() == Messages::NetworkProcess::SetPruneEntriesDownTo::name()) { |
1546 | IPC::handleMessageAsync<Messages::NetworkProcess::SetPruneEntriesDownTo>(connection, decoder, this, &NetworkProcess::setPruneEntriesDownTo); |
1547 | return; |
1548 | } |
1549 | #endif |
1550 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1551 | if (decoder.messageName() == Messages::NetworkProcess::SetShouldClassifyResourcesBeforeDataRecordsRemoval::name()) { |
1552 | IPC::handleMessageAsync<Messages::NetworkProcess::SetShouldClassifyResourcesBeforeDataRecordsRemoval>(connection, decoder, this, &NetworkProcess::setShouldClassifyResourcesBeforeDataRecordsRemoval); |
1553 | return; |
1554 | } |
1555 | #endif |
1556 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1557 | if (decoder.messageName() == Messages::NetworkProcess::SetNotifyPagesWhenDataRecordsWereScanned::name()) { |
1558 | IPC::handleMessageAsync<Messages::NetworkProcess::SetNotifyPagesWhenDataRecordsWereScanned>(connection, decoder, this, &NetworkProcess::setNotifyPagesWhenDataRecordsWereScanned); |
1559 | return; |
1560 | } |
1561 | #endif |
1562 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1563 | if (decoder.messageName() == Messages::NetworkProcess::SetIsRunningResourceLoadStatisticsTest::name()) { |
1564 | IPC::handleMessageAsync<Messages::NetworkProcess::SetIsRunningResourceLoadStatisticsTest>(connection, decoder, this, &NetworkProcess::setIsRunningResourceLoadStatisticsTest); |
1565 | return; |
1566 | } |
1567 | #endif |
1568 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1569 | if (decoder.messageName() == Messages::NetworkProcess::SetNotifyPagesWhenTelemetryWasCaptured::name()) { |
1570 | IPC::handleMessageAsync<Messages::NetworkProcess::SetNotifyPagesWhenTelemetryWasCaptured>(connection, decoder, this, &NetworkProcess::setNotifyPagesWhenTelemetryWasCaptured); |
1571 | return; |
1572 | } |
1573 | #endif |
1574 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1575 | if (decoder.messageName() == Messages::NetworkProcess::SetResourceLoadStatisticsDebugMode::name()) { |
1576 | IPC::handleMessageAsync<Messages::NetworkProcess::SetResourceLoadStatisticsDebugMode>(connection, decoder, this, &NetworkProcess::setResourceLoadStatisticsDebugMode); |
1577 | return; |
1578 | } |
1579 | #endif |
1580 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1581 | if (decoder.messageName() == Messages::NetworkProcess::SetVeryPrevalentResource::name()) { |
1582 | IPC::handleMessageAsync<Messages::NetworkProcess::SetVeryPrevalentResource>(connection, decoder, this, &NetworkProcess::setVeryPrevalentResource); |
1583 | return; |
1584 | } |
1585 | #endif |
1586 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1587 | if (decoder.messageName() == Messages::NetworkProcess::SetSubframeUnderTopFrameDomain::name()) { |
1588 | IPC::handleMessageAsync<Messages::NetworkProcess::SetSubframeUnderTopFrameDomain>(connection, decoder, this, &NetworkProcess::setSubframeUnderTopFrameDomain); |
1589 | return; |
1590 | } |
1591 | #endif |
1592 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1593 | if (decoder.messageName() == Messages::NetworkProcess::SetSubresourceUnderTopFrameDomain::name()) { |
1594 | IPC::handleMessageAsync<Messages::NetworkProcess::SetSubresourceUnderTopFrameDomain>(connection, decoder, this, &NetworkProcess::setSubresourceUnderTopFrameDomain); |
1595 | return; |
1596 | } |
1597 | #endif |
1598 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1599 | if (decoder.messageName() == Messages::NetworkProcess::SetSubresourceUniqueRedirectTo::name()) { |
1600 | IPC::handleMessageAsync<Messages::NetworkProcess::SetSubresourceUniqueRedirectTo>(connection, decoder, this, &NetworkProcess::setSubresourceUniqueRedirectTo); |
1601 | return; |
1602 | } |
1603 | #endif |
1604 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1605 | if (decoder.messageName() == Messages::NetworkProcess::SetSubresourceUniqueRedirectFrom::name()) { |
1606 | IPC::handleMessageAsync<Messages::NetworkProcess::SetSubresourceUniqueRedirectFrom>(connection, decoder, this, &NetworkProcess::setSubresourceUniqueRedirectFrom); |
1607 | return; |
1608 | } |
1609 | #endif |
1610 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1611 | if (decoder.messageName() == Messages::NetworkProcess::SetTimeToLiveUserInteraction::name()) { |
1612 | IPC::handleMessageAsync<Messages::NetworkProcess::SetTimeToLiveUserInteraction>(connection, decoder, this, &NetworkProcess::setTimeToLiveUserInteraction); |
1613 | return; |
1614 | } |
1615 | #endif |
1616 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1617 | if (decoder.messageName() == Messages::NetworkProcess::SetTopFrameUniqueRedirectTo::name()) { |
1618 | IPC::handleMessageAsync<Messages::NetworkProcess::SetTopFrameUniqueRedirectTo>(connection, decoder, this, &NetworkProcess::setTopFrameUniqueRedirectTo); |
1619 | return; |
1620 | } |
1621 | #endif |
1622 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1623 | if (decoder.messageName() == Messages::NetworkProcess::SetTopFrameUniqueRedirectFrom::name()) { |
1624 | IPC::handleMessageAsync<Messages::NetworkProcess::SetTopFrameUniqueRedirectFrom>(connection, decoder, this, &NetworkProcess::setTopFrameUniqueRedirectFrom); |
1625 | return; |
1626 | } |
1627 | #endif |
1628 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1629 | if (decoder.messageName() == Messages::NetworkProcess::ResetCacheMaxAgeCapForPrevalentResources::name()) { |
1630 | IPC::handleMessageAsync<Messages::NetworkProcess::ResetCacheMaxAgeCapForPrevalentResources>(connection, decoder, this, &NetworkProcess::resetCacheMaxAgeCapForPrevalentResources); |
1631 | return; |
1632 | } |
1633 | #endif |
1634 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1635 | if (decoder.messageName() == Messages::NetworkProcess::DidCommitCrossSiteLoadWithDataTransfer::name()) { |
1636 | IPC::handleMessage<Messages::NetworkProcess::DidCommitCrossSiteLoadWithDataTransfer>(decoder, this, &NetworkProcess::didCommitCrossSiteLoadWithDataTransfer); |
1637 | return; |
1638 | } |
1639 | #endif |
1640 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1641 | if (decoder.messageName() == Messages::NetworkProcess::SetCrossSiteLoadWithLinkDecorationForTesting::name()) { |
1642 | IPC::handleMessageAsync<Messages::NetworkProcess::SetCrossSiteLoadWithLinkDecorationForTesting>(connection, decoder, this, &NetworkProcess::setCrossSiteLoadWithLinkDecorationForTesting); |
1643 | return; |
1644 | } |
1645 | #endif |
1646 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1647 | if (decoder.messageName() == Messages::NetworkProcess::ResetCrossSiteLoadsWithLinkDecorationForTesting::name()) { |
1648 | IPC::handleMessageAsync<Messages::NetworkProcess::ResetCrossSiteLoadsWithLinkDecorationForTesting>(connection, decoder, this, &NetworkProcess::resetCrossSiteLoadsWithLinkDecorationForTesting); |
1649 | return; |
1650 | } |
1651 | #endif |
1652 | #if ENABLE(RESOURCE_LOAD_STATISTICS) |
1653 | if (decoder.messageName() == Messages::NetworkProcess::DeleteCookiesForTesting::name()) { |
1654 | IPC::handleMessageAsync<Messages::NetworkProcess::DeleteCookiesForTesting>(connection, decoder, this, &NetworkProcess::deleteCookiesForTesting); |
1655 | return; |
1656 | } |
1657 | #endif |
1658 | if (decoder.messageName() == Messages::NetworkProcess::SetSessionIsControlledByAutomation::name()) { |
1659 | IPC::handleMessage<Messages::NetworkProcess::SetSessionIsControlledByAutomation>(decoder, this, &NetworkProcess::setSessionIsControlledByAutomation); |
1660 | return; |
1661 | } |
1662 | if (decoder.messageName() == Messages::NetworkProcess::RegisterURLSchemeAsSecure::name()) { |
1663 | IPC::handleMessage<Messages::NetworkProcess::RegisterURLSchemeAsSecure>(decoder, this, &NetworkProcess::registerURLSchemeAsSecure); |
1664 | return; |
1665 | } |
1666 | if (decoder.messageName() == Messages::NetworkProcess::RegisterURLSchemeAsBypassingContentSecurityPolicy::name()) { |
1667 | IPC::handleMessage<Messages::NetworkProcess::RegisterURLSchemeAsBypassingContentSecurityPolicy>(decoder, this, &NetworkProcess::registerURLSchemeAsBypassingContentSecurityPolicy); |
1668 | return; |
1669 | } |
1670 | if (decoder.messageName() == Messages::NetworkProcess::RegisterURLSchemeAsLocal::name()) { |
1671 | IPC::handleMessage<Messages::NetworkProcess::RegisterURLSchemeAsLocal>(decoder, this, &NetworkProcess::registerURLSchemeAsLocal); |
1672 | return; |
1673 | } |
1674 | if (decoder.messageName() == Messages::NetworkProcess::RegisterURLSchemeAsNoAccess::name()) { |
1675 | IPC::handleMessage<Messages::NetworkProcess::RegisterURLSchemeAsNoAccess>(decoder, this, &NetworkProcess::registerURLSchemeAsNoAccess); |
1676 | return; |
1677 | } |
1678 | if (decoder.messageName() == Messages::NetworkProcess::RegisterURLSchemeAsDisplayIsolated::name()) { |
1679 | IPC::handleMessage<Messages::NetworkProcess::RegisterURLSchemeAsDisplayIsolated>(decoder, this, &NetworkProcess::registerURLSchemeAsDisplayIsolated); |
1680 | return; |
1681 | } |
1682 | if (decoder.messageName() == Messages::NetworkProcess::RegisterURLSchemeAsCORSEnabled::name()) { |
1683 | IPC::handleMessage<Messages::NetworkProcess::RegisterURLSchemeAsCORSEnabled>(decoder, this, &NetworkProcess::registerURLSchemeAsCORSEnabled); |
1684 | return; |
1685 | } |
1686 | if (decoder.messageName() == Messages::NetworkProcess::RegisterURLSchemeAsCanDisplayOnlyIfCanRequest::name()) { |
1687 | IPC::handleMessage<Messages::NetworkProcess::RegisterURLSchemeAsCanDisplayOnlyIfCanRequest>(decoder, this, &NetworkProcess::registerURLSchemeAsCanDisplayOnlyIfCanRequest); |
1688 | return; |
1689 | } |
1690 | if (decoder.messageName() == Messages::NetworkProcess::SetCacheStorageParameters::name()) { |
1691 | IPC::handleMessage<Messages::NetworkProcess::SetCacheStorageParameters>(decoder, this, &NetworkProcess::setCacheStorageParameters); |
1692 | return; |
1693 | } |
1694 | #if ENABLE(SERVICE_WORKER) |
1695 | if (decoder.messageName() == Messages::NetworkProcess::PostMessageToServiceWorkerClient::name()) { |
1696 | IPC::handleMessage<Messages::NetworkProcess::PostMessageToServiceWorkerClient>(decoder, this, &NetworkProcess::postMessageToServiceWorkerClient); |
1697 | return; |
1698 | } |
1699 | #endif |
1700 | #if ENABLE(SERVICE_WORKER) |
1701 | if (decoder.messageName() == Messages::NetworkProcess::PostMessageToServiceWorker::name()) { |
1702 | IPC::handleMessage<Messages::NetworkProcess::PostMessageToServiceWorker>(decoder, this, &NetworkProcess::postMessageToServiceWorker); |
1703 | return; |
1704 | } |
1705 | #endif |
1706 | #if ENABLE(SERVICE_WORKER) |
1707 | if (decoder.messageName() == Messages::NetworkProcess::DisableServiceWorkerProcessTerminationDelay::name()) { |
1708 | IPC::handleMessage<Messages::NetworkProcess::DisableServiceWorkerProcessTerminationDelay>(decoder, this, &NetworkProcess::disableServiceWorkerProcessTerminationDelay); |
1709 | return; |
1710 | } |
1711 | #endif |
1712 | #if ENABLE(INDEXED_DATABASE) |
1713 | if (decoder.messageName() == Messages::NetworkProcess::SetIDBPerOriginQuota::name()) { |
1714 | IPC::handleMessage<Messages::NetworkProcess::SetIDBPerOriginQuota>(decoder, this, &NetworkProcess::setIDBPerOriginQuota); |
1715 | return; |
1716 | } |
1717 | #endif |
1718 | if (decoder.messageName() == Messages::NetworkProcess::UpdateQuotaBasedOnSpaceUsageForTesting::name()) { |
1719 | IPC::handleMessage<Messages::NetworkProcess::UpdateQuotaBasedOnSpaceUsageForTesting>(decoder, this, &NetworkProcess::updateQuotaBasedOnSpaceUsageForTesting); |
1720 | return; |
1721 | } |
1722 | if (decoder.messageName() == Messages::NetworkProcess::StoreAdClickAttribution::name()) { |
1723 | IPC::handleMessage<Messages::NetworkProcess::StoreAdClickAttribution>(decoder, this, &NetworkProcess::storeAdClickAttribution); |
1724 | return; |
1725 | } |
1726 | if (decoder.messageName() == Messages::NetworkProcess::DumpAdClickAttribution::name()) { |
1727 | IPC::handleMessageAsync<Messages::NetworkProcess::DumpAdClickAttribution>(connection, decoder, this, &NetworkProcess::dumpAdClickAttribution); |
1728 | return; |
1729 | } |
1730 | if (decoder.messageName() == Messages::NetworkProcess::ClearAdClickAttribution::name()) { |
1731 | IPC::handleMessageAsync<Messages::NetworkProcess::ClearAdClickAttribution>(connection, decoder, this, &NetworkProcess::clearAdClickAttribution); |
1732 | return; |
1733 | } |
1734 | if (decoder.messageName() == Messages::NetworkProcess::SetAdClickAttributionOverrideTimerForTesting::name()) { |
1735 | IPC::handleMessageAsync<Messages::NetworkProcess::SetAdClickAttributionOverrideTimerForTesting>(connection, decoder, this, &NetworkProcess::setAdClickAttributionOverrideTimerForTesting); |
1736 | return; |
1737 | } |
1738 | if (decoder.messageName() == Messages::NetworkProcess::SetAdClickAttributionConversionURLForTesting::name()) { |
1739 | IPC::handleMessageAsync<Messages::NetworkProcess::SetAdClickAttributionConversionURLForTesting>(connection, decoder, this, &NetworkProcess::setAdClickAttributionConversionURLForTesting); |
1740 | return; |
1741 | } |
1742 | if (decoder.messageName() == Messages::NetworkProcess::MarkAdClickAttributionsAsExpiredForTesting::name()) { |
1743 | IPC::handleMessageAsync<Messages::NetworkProcess::MarkAdClickAttributionsAsExpiredForTesting>(connection, decoder, this, &NetworkProcess::markAdClickAttributionsAsExpiredForTesting); |
1744 | return; |
1745 | } |
1746 | if (decoder.messageName() == Messages::NetworkProcess::OriginsWithPersistentCredentials::name()) { |
1747 | IPC::handleMessageAsync<Messages::NetworkProcess::OriginsWithPersistentCredentials>(connection, decoder, this, &NetworkProcess::originsWithPersistentCredentials); |
1748 | return; |
1749 | } |
1750 | if (decoder.messageName() == Messages::NetworkProcess::RemoveCredentialsWithOrigins::name()) { |
1751 | IPC::handleMessageAsync<Messages::NetworkProcess::RemoveCredentialsWithOrigins>(connection, decoder, this, &NetworkProcess::removeCredentialsWithOrigins); |
1752 | return; |
1753 | } |
1754 | if (decoder.messageName() == Messages::NetworkProcess::GetLocalStorageOriginDetails::name()) { |
1755 | IPC::handleMessageAsync<Messages::NetworkProcess::GetLocalStorageOriginDetails>(connection, decoder, this, &NetworkProcess::getLocalStorageOriginDetails); |
1756 | return; |
1757 | } |
1758 | UNUSED_PARAM(connection); |
1759 | UNUSED_PARAM(decoder); |
1760 | ASSERT_NOT_REACHED(); |
1761 | } |
1762 | |
1763 | void NetworkProcess::didReceiveSyncNetworkProcessMessage(IPC::Connection& connection, IPC::Decoder& decoder, std::unique_ptr<IPC::Encoder>& replyEncoder) |
1764 | { |
1765 | if (decoder.messageName() == Messages::NetworkProcess::SetAllowsAnySSLCertificateForWebSocket::name()) { |
1766 | IPC::handleMessageSynchronous<Messages::NetworkProcess::SetAllowsAnySSLCertificateForWebSocket>(connection, decoder, replyEncoder, this, &NetworkProcess::setAllowsAnySSLCertificateForWebSocket); |
1767 | return; |
1768 | } |
1769 | UNUSED_PARAM(connection); |
1770 | UNUSED_PARAM(decoder); |
1771 | UNUSED_PARAM(replyEncoder); |
1772 | ASSERT_NOT_REACHED(); |
1773 | } |
1774 | |
1775 | } // namespace WebKit |
1776 | |
1777 | |