Index: chrome/browser/sync_file_system/drive_backend/sync_task_manager.cc |
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_task_manager.cc b/chrome/browser/sync_file_system/drive_backend/sync_task_manager.cc |
index acdb242094c308a931a5d656494b07867b36abd8..b971db1f29c43ff88ef072d43e154d13788c7744 100644 |
--- a/chrome/browser/sync_file_system/drive_backend/sync_task_manager.cc |
+++ b/chrome/browser/sync_file_system/drive_backend/sync_task_manager.cc |
@@ -201,7 +201,8 @@ bool SyncTaskManager::IsRunningTask(int64_t token_id) const { |
if (token_id == SyncTaskToken::kForegroundTaskTokenID) |
return true; |
- return ContainsKey(running_background_tasks_, token_id); |
+ return running_background_tasks_.find(token_id) != |
+ running_background_tasks_.end(); |
} |
void SyncTaskManager::DetachFromSequence() { |
@@ -240,7 +241,8 @@ void SyncTaskManager::NotifyTaskDoneBody(std::unique_ptr<SyncTaskToken> token, |
token_ = std::move(token); |
task = std::move(running_foreground_task_); |
} else { |
- task = running_background_tasks_.take_and_erase(token->token_id()); |
+ task = std::move(running_background_tasks_[token->token_id()]); |
+ running_background_tasks_.erase(token->token_id()); |
} |
// Acquire the token to prevent a new task to jump into the queue. |
@@ -343,8 +345,8 @@ void SyncTaskManager::UpdateTaskBlockerBody( |
weak_ptr_factory_.GetWeakPtr(), task_runner_.get(), task_token_seq_++, |
std::move(task_blocker)); |
background_task_token->UpdateTask(from_here, callback); |
- running_background_tasks_.set(background_task_token->token_id(), |
- std::move(running_foreground_task_)); |
+ running_background_tasks_[background_task_token->token_id()] = |
+ std::move(running_foreground_task_); |
} |
token_ = std::move(foreground_task_token); |