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 |