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 de4f37f8223b3bedeba8ba5b70c30e14d65c2f30..23cde3c2ea545787820f0033e82470c4476b9c9a 100644 |
--- a/chrome/browser/chromeos/file_system_provider/throttled_file_system.cc |
+++ b/chrome/browser/chromeos/file_system_provider/throttled_file_system.cc |
@@ -57,7 +57,7 @@ AbortCallback ThrottledFileSystem::OpenFile(const base::FilePath& file_path, |
OpenFileMode mode, |
const OpenFileCallback& callback) { |
const size_t task_token = open_queue_->NewToken(); |
- return open_queue_->Enqueue( |
+ open_queue_->Enqueue( |
task_token, |
base::Bind( |
&ProvidedFileSystemInterface::OpenFile, |
@@ -65,6 +65,8 @@ AbortCallback ThrottledFileSystem::OpenFile(const base::FilePath& file_path, |
file_path, mode, |
base::Bind(&ThrottledFileSystem::OnOpenFileCompleted, |
weak_ptr_factory_.GetWeakPtr(), task_token, callback))); |
+ return base::Bind(&ThrottledFileSystem::Abort, weak_ptr_factory_.GetWeakPtr(), |
+ task_token); |
} |
AbortCallback ThrottledFileSystem::CloseFile( |
@@ -181,6 +183,10 @@ base::WeakPtr<ProvidedFileSystemInterface> ThrottledFileSystem::GetWeakPtr() { |
return weak_ptr_factory_.GetWeakPtr(); |
} |
+void ThrottledFileSystem::Abort(int queue_token) { |
+ open_queue_->Abort(queue_token); |
+} |
+ |
void ThrottledFileSystem::OnOpenFileCompleted(int queue_token, |
const OpenFileCallback& callback, |
int file_handle, |