OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "storage/browser/fileapi/file_system_operation_runner.h" | 5 #include "storage/browser/fileapi/file_system_operation_runner.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
10 #include "net/url_request/url_request_context.h" | 10 #include "net/url_request/url_request_context.h" |
11 #include "storage/browser/blob/blob_url_request_job_factory.h" | 11 #include "storage/browser/blob/blob_url_request_job_factory.h" |
12 #include "storage/browser/blob/shareable_file_reference.h" | 12 #include "storage/browser/blob/shareable_file_reference.h" |
13 #include "storage/browser/fileapi/file_observers.h" | 13 #include "storage/browser/fileapi/file_observers.h" |
14 #include "storage/browser/fileapi/file_stream_writer.h" | 14 #include "storage/browser/fileapi/file_stream_writer.h" |
15 #include "storage/browser/fileapi/file_system_context.h" | 15 #include "storage/browser/fileapi/file_system_context.h" |
16 #include "storage/browser/fileapi/file_system_operation.h" | |
17 #include "storage/browser/fileapi/file_writer_delegate.h" | 16 #include "storage/browser/fileapi/file_writer_delegate.h" |
18 | 17 |
19 namespace storage { | 18 namespace storage { |
20 | 19 |
21 typedef FileSystemOperationRunner::OperationID OperationID; | 20 typedef FileSystemOperationRunner::OperationID OperationID; |
22 | 21 |
23 class FileSystemOperationRunner::BeginOperationScoper | 22 class FileSystemOperationRunner::BeginOperationScoper |
24 : public base::SupportsWeakPtr< | 23 : public base::SupportsWeakPtr< |
25 FileSystemOperationRunner::BeginOperationScoper> { | 24 FileSystemOperationRunner::BeginOperationScoper> { |
26 public: | 25 public: |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 stray_cancel_callbacks_.find(id); | 680 stray_cancel_callbacks_.find(id); |
682 if (found_cancel != stray_cancel_callbacks_.end()) { | 681 if (found_cancel != stray_cancel_callbacks_.end()) { |
683 // This cancel has been requested after the operation has finished, | 682 // This cancel has been requested after the operation has finished, |
684 // so report that we failed to stop it. | 683 // so report that we failed to stop it. |
685 found_cancel->second.Run(base::File::FILE_ERROR_INVALID_OPERATION); | 684 found_cancel->second.Run(base::File::FILE_ERROR_INVALID_OPERATION); |
686 stray_cancel_callbacks_.erase(found_cancel); | 685 stray_cancel_callbacks_.erase(found_cancel); |
687 } | 686 } |
688 } | 687 } |
689 | 688 |
690 } // namespace storage | 689 } // namespace storage |
OLD | NEW |