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

Side by Side Diff: content/browser/background_sync/background_sync_manager.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/background_sync/background_sync_manager.h" 5 #include "content/browser/background_sync/background_sync_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/barrier_closure.h" 9 #include "base/barrier_closure.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 events_completed_barrier_closure)); 967 events_completed_barrier_closure));
968 } 968 }
969 } 969 }
970 970
971 void BackgroundSyncManager::FireReadyEventsDidFindRegistration( 971 void BackgroundSyncManager::FireReadyEventsDidFindRegistration(
972 const std::string& tag, 972 const std::string& tag,
973 BackgroundSyncRegistration::RegistrationId registration_id, 973 BackgroundSyncRegistration::RegistrationId registration_id,
974 const base::Closure& event_fired_callback, 974 const base::Closure& event_fired_callback,
975 const base::Closure& event_completed_callback, 975 const base::Closure& event_completed_callback,
976 ServiceWorkerStatusCode service_worker_status, 976 ServiceWorkerStatusCode service_worker_status,
977 const scoped_refptr<ServiceWorkerRegistration>& 977 scoped_refptr<ServiceWorkerRegistration> service_worker_registration) {
978 service_worker_registration) {
979 DCHECK_CURRENTLY_ON(BrowserThread::IO); 978 DCHECK_CURRENTLY_ON(BrowserThread::IO);
980 if (service_worker_status != SERVICE_WORKER_OK) { 979 if (service_worker_status != SERVICE_WORKER_OK) {
981 base::ThreadTaskRunnerHandle::Get()->PostTask( 980 base::ThreadTaskRunnerHandle::Get()->PostTask(
982 FROM_HERE, base::Bind(event_fired_callback)); 981 FROM_HERE, base::Bind(event_fired_callback));
983 base::ThreadTaskRunnerHandle::Get()->PostTask( 982 base::ThreadTaskRunnerHandle::Get()->PostTask(
984 FROM_HERE, base::Bind(event_completed_callback)); 983 FROM_HERE, base::Bind(event_completed_callback));
985 return; 984 return;
986 } 985 }
987 986
988 BackgroundSyncRegistration* registration = 987 BackgroundSyncRegistration* registration =
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 parameters_->max_sync_attempts = max_attempts; 1187 parameters_->max_sync_attempts = max_attempts;
1189 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback); 1188 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback);
1190 } 1189 }
1191 1190
1192 base::Closure BackgroundSyncManager::MakeEmptyCompletion() { 1191 base::Closure BackgroundSyncManager::MakeEmptyCompletion() {
1193 DCHECK_CURRENTLY_ON(BrowserThread::IO); 1192 DCHECK_CURRENTLY_ON(BrowserThread::IO);
1194 return op_scheduler_.WrapCallbackToRunNext(base::Bind(&base::DoNothing)); 1193 return op_scheduler_.WrapCallbackToRunNext(base::Bind(&base::DoNothing));
1195 } 1194 }
1196 1195
1197 } // namespace content 1196 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698