summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkarlin <jkarlin@chromium.org>2015-04-07 15:53:34 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-07 22:54:05 +0000
commit0a76becb3c8bc0dce4a6b05a1c3b7a1c42053d1d (patch)
treef4968d4403af5253607597039ca782b15b0ca693
parent4ed20b10757af80bd743ede1742421c312503d14 (diff)
downloadchromium_src-0a76becb3c8bc0dce4a6b05a1c3b7a1c42053d1d.zip
chromium_src-0a76becb3c8bc0dce4a6b05a1c3b7a1c42053d1d.tar.gz
chromium_src-0a76becb3c8bc0dce4a6b05a1c3b7a1c42053d1d.tar.bz2
Remove unused parameter.
Review URL: https://codereview.chromium.org/1059183004 Cr-Commit-Position: refs/heads/master@{#324141}
-rw-r--r--content/browser/background_sync/background_sync_manager.cc18
-rw-r--r--content/browser/background_sync/background_sync_manager.h7
2 files changed, 6 insertions, 19 deletions
diff --git a/content/browser/background_sync/background_sync_manager.cc b/content/browser/background_sync/background_sync_manager.cc
index 9036ca0..d997652 100644
--- a/content/browser/background_sync/background_sync_manager.cc
+++ b/content/browser/background_sync/background_sync_manager.cc
@@ -386,20 +386,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(
@@ -455,20 +449,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) {
diff --git a/content/browser/background_sync/background_sync_manager.h b/content/browser/background_sync/background_sync_manager.h
index a2cad0d..ca910bf 100644
--- a/content/browser/background_sync/background_sync_manager.h
+++ b/content/browser/background_sync/background_sync_manager.h
@@ -174,11 +174,9 @@ class CONTENT_EXPORT BackgroundSyncManager
int64 sw_registration_id,
const ServiceWorkerStorage::StatusCallback& callback);
- // If the registration is in the map, removes it and returns the removed
- // registration in |old_registration|. |old_registration| may be null.
+ // Removes the registration if it is in the map.
void RemoveRegistrationFromMap(int64 sw_registration_id,
- const std::string& sync_registration_name,
- BackgroundSyncRegistration* old_registration);
+ const std::string& sync_registration_name);
void AddRegistrationToMap(
int64 sw_registration_id,
@@ -209,7 +207,6 @@ class CONTENT_EXPORT BackgroundSyncManager
const StatusCallback& callback);
void UnregisterDidStore(
int64 sw_registration_id,
- const BackgroundSyncRegistration& old_sync_registration,
const StatusCallback& callback,
ServiceWorkerStatusCode status);