Commit 0a76becb authored by jkarlin's avatar jkarlin Committed by Commit bot

Remove unused parameter.

Review URL: https://codereview.chromium.org/1059183004

Cr-Commit-Position: refs/heads/master@{#324141}
parent 4ed20b10
...@@ -386,20 +386,14 @@ void BackgroundSyncManager::RegisterDidStore( ...@@ -386,20 +386,14 @@ void BackgroundSyncManager::RegisterDidStore(
void BackgroundSyncManager::RemoveRegistrationFromMap( void BackgroundSyncManager::RemoveRegistrationFromMap(
int64 sw_registration_id, int64 sw_registration_id,
const std::string& sync_registration_name, const std::string& sync_registration_name) {
BackgroundSyncRegistration* old_registration) {
DCHECK( DCHECK(
LookupRegistration(sw_registration_id, sync_registration_name, nullptr)); LookupRegistration(sw_registration_id, sync_registration_name, nullptr));
BackgroundSyncRegistrations* registrations = BackgroundSyncRegistrations* registrations =
&sw_to_registrations_map_[sw_registration_id]; &sw_to_registrations_map_[sw_registration_id];
const auto name_and_registration_iter = registrations->name_to_registration_map.erase(sync_registration_name);
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);
} }
void BackgroundSyncManager::AddRegistrationToMap( void BackgroundSyncManager::AddRegistrationToMap(
...@@ -455,20 +449,16 @@ void BackgroundSyncManager::UnregisterImpl( ...@@ -455,20 +449,16 @@ void BackgroundSyncManager::UnregisterImpl(
return; return;
} }
BackgroundSyncRegistration old_sync_registration; RemoveRegistrationFromMap(sw_registration_id, sync_registration_name);
RemoveRegistrationFromMap(sw_registration_id, sync_registration_name,
&old_sync_registration);
StoreRegistrations( StoreRegistrations(
origin, sw_registration_id, origin, sw_registration_id,
base::Bind(&BackgroundSyncManager::UnregisterDidStore, base::Bind(&BackgroundSyncManager::UnregisterDidStore,
weak_ptr_factory_.GetWeakPtr(), sw_registration_id, weak_ptr_factory_.GetWeakPtr(), sw_registration_id, callback));
old_sync_registration, callback));
} }
void BackgroundSyncManager::UnregisterDidStore( void BackgroundSyncManager::UnregisterDidStore(
int64 sw_registration_id, int64 sw_registration_id,
const BackgroundSyncRegistration& old_sync_registration,
const StatusCallback& callback, const StatusCallback& callback,
ServiceWorkerStatusCode status) { ServiceWorkerStatusCode status) {
if (status == SERVICE_WORKER_ERROR_NOT_FOUND) { if (status == SERVICE_WORKER_ERROR_NOT_FOUND) {
......
...@@ -174,11 +174,9 @@ class CONTENT_EXPORT BackgroundSyncManager ...@@ -174,11 +174,9 @@ class CONTENT_EXPORT BackgroundSyncManager
int64 sw_registration_id, int64 sw_registration_id,
const ServiceWorkerStorage::StatusCallback& callback); const ServiceWorkerStorage::StatusCallback& callback);
// If the registration is in the map, removes it and returns the removed // Removes the registration if it is in the map.
// registration in |old_registration|. |old_registration| may be null.
void RemoveRegistrationFromMap(int64 sw_registration_id, void RemoveRegistrationFromMap(int64 sw_registration_id,
const std::string& sync_registration_name, const std::string& sync_registration_name);
BackgroundSyncRegistration* old_registration);
void AddRegistrationToMap( void AddRegistrationToMap(
int64 sw_registration_id, int64 sw_registration_id,
...@@ -209,7 +207,6 @@ class CONTENT_EXPORT BackgroundSyncManager ...@@ -209,7 +207,6 @@ class CONTENT_EXPORT BackgroundSyncManager
const StatusCallback& callback); const StatusCallback& callback);
void UnregisterDidStore( void UnregisterDidStore(
int64 sw_registration_id, int64 sw_registration_id,
const BackgroundSyncRegistration& old_sync_registration,
const StatusCallback& callback, const StatusCallback& callback,
ServiceWorkerStatusCode status); ServiceWorkerStatusCode status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment