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

Unified Diff: chrome/browser/chromeos/file_system_provider/provided_file_system.cc

Issue 971303003: Simplify file_system_provider::Queue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | chrome/browser/chromeos/file_system_provider/queue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/file_system_provider/provided_file_system.cc
diff --git a/chrome/browser/chromeos/file_system_provider/provided_file_system.cc b/chrome/browser/chromeos/file_system_provider/provided_file_system.cc
index 76671e04e3afbfbe1c1cd210c4b868d2b144a54e..aef7e5842a94cb0501941e85f0ecc32fca574723 100644
--- a/chrome/browser/chromeos/file_system_provider/provided_file_system.cc
+++ b/chrome/browser/chromeos/file_system_provider/provided_file_system.cc
@@ -654,7 +654,6 @@ void ProvidedFileSystem::OnAddWatcherInQueueCompleted(
if (result != base::File::FILE_OK) {
callback.Run(result);
watcher_queue_.Complete(token);
- watcher_queue_.Remove(token);
return;
}
@@ -663,7 +662,6 @@ void ProvidedFileSystem::OnAddWatcherInQueueCompleted(
if (it != watchers_.end()) {
callback.Run(base::File::FILE_OK);
watcher_queue_.Complete(token);
- watcher_queue_.Remove(token);
return;
}
@@ -678,7 +676,6 @@ void ProvidedFileSystem::OnAddWatcherInQueueCompleted(
callback.Run(base::File::FILE_OK);
watcher_queue_.Complete(token);
- watcher_queue_.Remove(token);
}
void ProvidedFileSystem::OnRemoveWatcherInQueueCompleted(
@@ -690,7 +687,6 @@ void ProvidedFileSystem::OnRemoveWatcherInQueueCompleted(
base::File::Error result) {
if (!extension_response && result != base::File::FILE_OK) {
watcher_queue_.Complete(token);
- watcher_queue_.Remove(token);
callback.Run(result);
return;
}
@@ -712,7 +708,6 @@ void ProvidedFileSystem::OnRemoveWatcherInQueueCompleted(
callback.Run(base::File::FILE_OK);
watcher_queue_.Complete(token);
- watcher_queue_.Remove(token);
}
void ProvidedFileSystem::OnNotifyInQueueCompleted(
@@ -721,7 +716,6 @@ void ProvidedFileSystem::OnNotifyInQueueCompleted(
if (result != base::File::FILE_OK) {
args->callback.Run(result);
watcher_queue_.Complete(args->token);
- watcher_queue_.Remove(args->token);
return;
}
@@ -731,7 +725,6 @@ void ProvidedFileSystem::OnNotifyInQueueCompleted(
if (it == watchers_.end()) {
args->callback.Run(base::File::FILE_ERROR_NOT_FOUND);
watcher_queue_.Complete(args->token);
- watcher_queue_.Remove(args->token);
return;
}
@@ -754,7 +747,6 @@ void ProvidedFileSystem::OnNotifyInQueueCompleted(
args->callback.Run(base::File::FILE_OK);
watcher_queue_.Complete(args->token);
- watcher_queue_.Remove(args->token);
}
void ProvidedFileSystem::OnOpenFileCompleted(const base::FilePath& file_path,
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_system_provider/queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698