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/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1278 Send(new ServiceWorkerMsg_ServiceWorkerUnregistered(thread_id, | 1278 Send(new ServiceWorkerMsg_ServiceWorkerUnregistered(thread_id, |
1279 request_id, | 1279 request_id, |
1280 is_success)); | 1280 is_success)); |
1281 } | 1281 } |
1282 | 1282 |
1283 void ServiceWorkerDispatcherHost::GetRegistrationComplete( | 1283 void ServiceWorkerDispatcherHost::GetRegistrationComplete( |
1284 int thread_id, | 1284 int thread_id, |
1285 int provider_id, | 1285 int provider_id, |
1286 int request_id, | 1286 int request_id, |
1287 ServiceWorkerStatusCode status, | 1287 ServiceWorkerStatusCode status, |
1288 const scoped_refptr<ServiceWorkerRegistration>& registration) { | 1288 scoped_refptr<ServiceWorkerRegistration> registration) { |
1289 TRACE_EVENT_ASYNC_END2( | 1289 TRACE_EVENT_ASYNC_END2( |
1290 "ServiceWorker", "ServiceWorkerDispatcherHost::GetRegistration", | 1290 "ServiceWorker", "ServiceWorkerDispatcherHost::GetRegistration", |
1291 request_id, "Status", status, "Registration ID", | 1291 request_id, "Status", status, "Registration ID", |
1292 registration ? registration->id() : kInvalidServiceWorkerRegistrationId); | 1292 registration ? registration->id() : kInvalidServiceWorkerRegistrationId); |
1293 if (!GetContext()) | 1293 if (!GetContext()) |
1294 return; | 1294 return; |
1295 | 1295 |
1296 ServiceWorkerProviderHost* provider_host = | 1296 ServiceWorkerProviderHost* provider_host = |
1297 GetContext()->GetProviderHost(render_process_id_, provider_id); | 1297 GetContext()->GetProviderHost(render_process_id_, provider_id); |
1298 if (!provider_host) | 1298 if (!provider_host) |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1407 if (!handle) { | 1407 if (!handle) { |
1408 bad_message::ReceivedBadMessage(this, | 1408 bad_message::ReceivedBadMessage(this, |
1409 bad_message::SWDH_TERMINATE_BAD_HANDLE); | 1409 bad_message::SWDH_TERMINATE_BAD_HANDLE); |
1410 return; | 1410 return; |
1411 } | 1411 } |
1412 handle->version()->StopWorker( | 1412 handle->version()->StopWorker( |
1413 base::Bind(&ServiceWorkerUtils::NoOpStatusCallback)); | 1413 base::Bind(&ServiceWorkerUtils::NoOpStatusCallback)); |
1414 } | 1414 } |
1415 | 1415 |
1416 } // namespace content | 1416 } // namespace content |
OLD | NEW |