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

Unified Diff: content/browser/background_sync/background_sync_manager.cc

Issue 1059183004: [BackgroundSyncManager] Remove dead code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove moar! Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/background_sync/background_sync_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/background_sync/background_sync_manager.cc
diff --git a/content/browser/background_sync/background_sync_manager.cc b/content/browser/background_sync/background_sync_manager.cc
index d67aa7d4dbe286b9cc825bc7e2e2494ebf3d03ea..c16360d4b4b0f342c9144d8141e93906a68d59c1 100644
--- a/content/browser/background_sync/background_sync_manager.cc
+++ b/content/browser/background_sync/background_sync_manager.cc
@@ -382,20 +382,14 @@ void BackgroundSyncManager::RegisterDidStore(
void BackgroundSyncManager::RemoveRegistrationFromMap(
int64 sw_registration_id,
- const std::string& sync_registration_name,
- BackgroundSyncRegistration* old_registration) {
+ const std::string& sync_registration_name) {
DCHECK(
LookupRegistration(sw_registration_id, sync_registration_name, nullptr));
BackgroundSyncRegistrations* registrations =
&sw_to_registrations_map_[sw_registration_id];
- const auto name_and_registration_iter =
- registrations->name_to_registration_map.find(sync_registration_name);
- if (old_registration)
- *old_registration = name_and_registration_iter->second;
-
- registrations->name_to_registration_map.erase(name_and_registration_iter);
+ registrations->name_to_registration_map.erase(sync_registration_name);
}
void BackgroundSyncManager::AddRegistrationToMap(
@@ -451,20 +445,16 @@ void BackgroundSyncManager::UnregisterImpl(
return;
}
- BackgroundSyncRegistration old_sync_registration;
- RemoveRegistrationFromMap(sw_registration_id, sync_registration_name,
- &old_sync_registration);
+ RemoveRegistrationFromMap(sw_registration_id, sync_registration_name);
StoreRegistrations(
origin, sw_registration_id,
base::Bind(&BackgroundSyncManager::UnregisterDidStore,
- weak_ptr_factory_.GetWeakPtr(), sw_registration_id,
- old_sync_registration, callback));
+ weak_ptr_factory_.GetWeakPtr(), sw_registration_id, callback));
}
void BackgroundSyncManager::UnregisterDidStore(
int64 sw_registration_id,
- const BackgroundSyncRegistration& old_sync_registration,
const StatusCallback& callback,
ServiceWorkerStatusCode status) {
if (status == SERVICE_WORKER_ERROR_NOT_FOUND) {
« no previous file with comments | « content/browser/background_sync/background_sync_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698