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

Side by Side Diff: content/browser/background_sync/background_sync_manager.cc

Issue 2183783002: Revert of Stop passing const-reference of SWRegistration in all GetRegistrationsCallbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 scoped_refptr<ServiceWorkerRegistration> service_worker_registration) { 977 const scoped_refptr<ServiceWorkerRegistration>&
978 service_worker_registration) {
978 DCHECK_CURRENTLY_ON(BrowserThread::IO); 979 DCHECK_CURRENTLY_ON(BrowserThread::IO);
979 if (service_worker_status != SERVICE_WORKER_OK) { 980 if (service_worker_status != SERVICE_WORKER_OK) {
980 base::ThreadTaskRunnerHandle::Get()->PostTask( 981 base::ThreadTaskRunnerHandle::Get()->PostTask(
981 FROM_HERE, base::Bind(event_fired_callback)); 982 FROM_HERE, base::Bind(event_fired_callback));
982 base::ThreadTaskRunnerHandle::Get()->PostTask( 983 base::ThreadTaskRunnerHandle::Get()->PostTask(
983 FROM_HERE, base::Bind(event_completed_callback)); 984 FROM_HERE, base::Bind(event_completed_callback));
984 return; 985 return;
985 } 986 }
986 987
987 BackgroundSyncRegistration* registration = 988 BackgroundSyncRegistration* registration =
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 parameters_->max_sync_attempts = max_attempts; 1188 parameters_->max_sync_attempts = max_attempts;
1188 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback); 1189 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback);
1189 } 1190 }
1190 1191
1191 base::Closure BackgroundSyncManager::MakeEmptyCompletion() { 1192 base::Closure BackgroundSyncManager::MakeEmptyCompletion() {
1192 DCHECK_CURRENTLY_ON(BrowserThread::IO); 1193 DCHECK_CURRENTLY_ON(BrowserThread::IO);
1193 return op_scheduler_.WrapCallbackToRunNext(base::Bind(&base::DoNothing)); 1194 return op_scheduler_.WrapCallbackToRunNext(base::Bind(&base::DoNothing));
1194 } 1195 }
1195 1196
1196 } // namespace content 1197 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698