| OLD | NEW |
| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/debug/crash_logging.h" | 9 #include "base/debug/crash_logging.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 IPC_END_MESSAGE_MAP() | 252 IPC_END_MESSAGE_MAP() |
| 253 | 253 |
| 254 if (!handled && GetContext()) { | 254 if (!handled && GetContext()) { |
| 255 handled = GetContext()->embedded_worker_registry()->OnMessageReceived( | 255 handled = GetContext()->embedded_worker_registry()->OnMessageReceived( |
| 256 message, render_process_id_); | 256 message, render_process_id_); |
| 257 if (!handled) { | 257 if (!handled) { |
| 258 // Temporary debugging for https://crbug.com/625040 | 258 // Temporary debugging for https://crbug.com/625040 |
| 259 EmbeddedWorkerInstance* worker = | 259 EmbeddedWorkerInstance* worker = |
| 260 GetContext()->embedded_worker_registry()->GetWorkerForMessage( | 260 GetContext()->embedded_worker_registry()->GetWorkerForMessage( |
| 261 render_process_id_, message.routing_id()); | 261 render_process_id_, message.routing_id()); |
| 262 base::debug::ScopedCrashKey("swdh_not_handled_message_type", | 262 base::debug::ScopedCrashKey type_key( |
| 263 GetIPCMessageTypeAsString(message.type())); | 263 "swdh_not_handled_message_type", |
| 264 base::debug::ScopedCrashKey( | 264 GetIPCMessageTypeAsString(message.type())); |
| 265 base::debug::ScopedCrashKey status_key( |
| 265 "swdh_not_handled_worker_status", | 266 "swdh_not_handled_worker_status", |
| 266 EmbeddedWorkerInstance::StatusToString(worker->status())); | 267 EmbeddedWorkerInstance::StatusToString(worker->status())); |
| 267 bad_message::ReceivedBadMessage(this, bad_message::SWDH_NOT_HANDLED); | 268 bad_message::ReceivedBadMessage(this, bad_message::SWDH_NOT_HANDLED); |
| 268 } | 269 } |
| 269 } | 270 } |
| 270 | 271 |
| 271 return handled; | 272 return handled; |
| 272 } | 273 } |
| 273 | 274 |
| 274 bool ServiceWorkerDispatcherHost::Send(IPC::Message* message) { | 275 bool ServiceWorkerDispatcherHost::Send(IPC::Message* message) { |
| (...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1458 if (!handle) { | 1459 if (!handle) { |
| 1459 bad_message::ReceivedBadMessage(this, | 1460 bad_message::ReceivedBadMessage(this, |
| 1460 bad_message::SWDH_TERMINATE_BAD_HANDLE); | 1461 bad_message::SWDH_TERMINATE_BAD_HANDLE); |
| 1461 return; | 1462 return; |
| 1462 } | 1463 } |
| 1463 handle->version()->StopWorker( | 1464 handle->version()->StopWorker( |
| 1464 base::Bind(&ServiceWorkerUtils::NoOpStatusCallback)); | 1465 base::Bind(&ServiceWorkerUtils::NoOpStatusCallback)); |
| 1465 } | 1466 } |
| 1466 | 1467 |
| 1467 } // namespace content | 1468 } // namespace content |
| OLD | NEW |