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 "webkit/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/message_loop/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop_proxy.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "net/url_request/url_request_context.h" | 10 #include "net/url_request/url_request_context.h" |
11 #include "webkit/browser/blob/blob_url_request_job_factory.h" | 11 #include "storage/browser/blob/blob_url_request_job_factory.h" |
12 #include "webkit/browser/fileapi/file_observers.h" | 12 #include "storage/browser/fileapi/file_observers.h" |
13 #include "webkit/browser/fileapi/file_stream_writer.h" | 13 #include "storage/browser/fileapi/file_stream_writer.h" |
14 #include "webkit/browser/fileapi/file_system_context.h" | 14 #include "storage/browser/fileapi/file_system_context.h" |
15 #include "webkit/browser/fileapi/file_system_operation.h" | 15 #include "storage/browser/fileapi/file_system_operation.h" |
16 #include "webkit/browser/fileapi/file_writer_delegate.h" | 16 #include "storage/browser/fileapi/file_writer_delegate.h" |
17 #include "webkit/common/blob/shareable_file_reference.h" | 17 #include "storage/common/blob/shareable_file_reference.h" |
18 | 18 |
19 namespace storage { | 19 namespace storage { |
20 | 20 |
21 typedef FileSystemOperationRunner::OperationID OperationID; | 21 typedef FileSystemOperationRunner::OperationID OperationID; |
22 | 22 |
23 class FileSystemOperationRunner::BeginOperationScoper | 23 class FileSystemOperationRunner::BeginOperationScoper |
24 : public base::SupportsWeakPtr< | 24 : public base::SupportsWeakPtr< |
25 FileSystemOperationRunner::BeginOperationScoper> { | 25 FileSystemOperationRunner::BeginOperationScoper> { |
26 public: | 26 public: |
27 BeginOperationScoper() {} | 27 BeginOperationScoper() {} |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 stray_cancel_callbacks_.find(id); | 678 stray_cancel_callbacks_.find(id); |
679 if (found_cancel != stray_cancel_callbacks_.end()) { | 679 if (found_cancel != stray_cancel_callbacks_.end()) { |
680 // This cancel has been requested after the operation has finished, | 680 // This cancel has been requested after the operation has finished, |
681 // so report that we failed to stop it. | 681 // so report that we failed to stop it. |
682 found_cancel->second.Run(base::File::FILE_ERROR_INVALID_OPERATION); | 682 found_cancel->second.Run(base::File::FILE_ERROR_INVALID_OPERATION); |
683 stray_cancel_callbacks_.erase(found_cancel); | 683 stray_cancel_callbacks_.erase(found_cancel); |
684 } | 684 } |
685 } | 685 } |
686 | 686 |
687 } // namespace storage | 687 } // namespace storage |
OLD | NEW |