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

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

Issue 2181553003: Stop passing const-reference of SWRegistration in all GetRegistrationsCallbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ServiceWorkerContextCore::DidFindRegistrationForCheckHasServiceWorker() Created 4 years, 4 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
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 <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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698