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

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

Issue 968763002: Fix aborting in throttled file system (FSP). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaned up. 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 | « chrome/browser/chromeos/file_system_provider/queue_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/file_system_provider/throttled_file_system.cc
diff --git a/chrome/browser/chromeos/file_system_provider/throttled_file_system.cc b/chrome/browser/chromeos/file_system_provider/throttled_file_system.cc
index df4e424d3e7633fda4bfda99da1de1d698b25401..dc01372c78c98148b5841ab8f1298b4047812fdc 100644
--- a/chrome/browser/chromeos/file_system_provider/throttled_file_system.cc
+++ b/chrome/browser/chromeos/file_system_provider/throttled_file_system.cc
@@ -195,7 +195,11 @@ void ThrottledFileSystem::OnOpenFileCompleted(int queue_token,
const OpenFileCallback& callback,
int file_handle,
base::File::Error result) {
- if (result != base::File::FILE_ERROR_ABORT)
+ // The task may be aborted either via the callback, or by the operation, eg.
+ // because of destroying the request manager or unmounting the file system
+ // during the operation. Mark the task as completed only if it hasn't been
+ // aborted before.
+ if (!open_queue_->IsAborted(queue_token))
open_queue_->Complete(queue_token);
// If the file is opened successfully then hold the queue token until the file
« no previous file with comments | « chrome/browser/chromeos/file_system_provider/queue_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698