Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Side by Side Diff: content/browser/service_worker/service_worker_dispatcher_host.cc

Issue 292443004: Remove IPC_BEGIN_MESSAGE_MAP_EX macro since r270839 made all bad IPCs kill their child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/service_worker/service_worker_dispatcher_host.h" 5 #include "content/browser/service_worker/service_worker_dispatcher_host.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/browser/message_port_message_filter.h" 9 #include "content/browser/message_port_message_filter.h"
10 #include "content/browser/message_port_service.h" 10 #include "content/browser/message_port_service.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 for (size_t i = 0; i < messages.size(); ++i) { 78 for (size_t i = 0; i < messages.size(); ++i) {
79 BrowserMessageFilter::Send(messages[i]); 79 BrowserMessageFilter::Send(messages[i]);
80 } 80 }
81 } 81 }
82 82
83 void ServiceWorkerDispatcherHost::OnDestruct() const { 83 void ServiceWorkerDispatcherHost::OnDestruct() const {
84 BrowserThread::DeleteOnIOThread::Destruct(this); 84 BrowserThread::DeleteOnIOThread::Destruct(this);
85 } 85 }
86 86
87 bool ServiceWorkerDispatcherHost::OnMessageReceived( 87 bool ServiceWorkerDispatcherHost::OnMessageReceived(
88 const IPC::Message& message, 88 const IPC::Message& message) {
89 bool* message_was_ok) {
90 bool handled = true; 89 bool handled = true;
91 IPC_BEGIN_MESSAGE_MAP_EX( 90 IPC_BEGIN_MESSAGE_MAP(ServiceWorkerDispatcherHost, message)
92 ServiceWorkerDispatcherHost, message, *message_was_ok)
93 IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_RegisterServiceWorker, 91 IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_RegisterServiceWorker,
94 OnRegisterServiceWorker) 92 OnRegisterServiceWorker)
95 IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_UnregisterServiceWorker, 93 IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_UnregisterServiceWorker,
96 OnUnregisterServiceWorker) 94 OnUnregisterServiceWorker)
97 IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_ProviderCreated, 95 IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_ProviderCreated,
98 OnProviderCreated) 96 OnProviderCreated)
99 IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_ProviderDestroyed, 97 IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_ProviderDestroyed,
100 OnProviderDestroyed) 98 OnProviderDestroyed)
101 IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_SetVersionId, 99 IPC_MESSAGE_HANDLER(ServiceWorkerHostMsg_SetVersionId,
102 OnSetHostedVersionId) 100 OnSetHostedVersionId)
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 ServiceWorkerStatusCode status) { 403 ServiceWorkerStatusCode status) {
406 base::string16 error_message; 404 base::string16 error_message;
407 blink::WebServiceWorkerError::ErrorType error_type; 405 blink::WebServiceWorkerError::ErrorType error_type;
408 GetServiceWorkerRegistrationStatusResponse( 406 GetServiceWorkerRegistrationStatusResponse(
409 status, &error_type, &error_message); 407 status, &error_type, &error_message);
410 Send(new ServiceWorkerMsg_ServiceWorkerRegistrationError( 408 Send(new ServiceWorkerMsg_ServiceWorkerRegistrationError(
411 thread_id, request_id, error_type, error_message)); 409 thread_id, request_id, error_type, error_message));
412 } 410 }
413 411
414 } // namespace content 412 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698