| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
| 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| 11 #include "base/file_util_proxy.h" | 11 #include "base/file_util_proxy.h" |
| 12 #include "base/message_loop_proxy.h" | 12 #include "base/message_loop_proxy.h" |
| 13 #include "base/platform_file.h" | 13 #include "base/platform_file.h" |
| 14 #include "base/ref_counted.h" | 14 #include "base/ref_counted.h" |
| 15 #include "base/scoped_callback_factory.h" | 15 #include "base/scoped_callback_factory.h" |
| 16 #include "base/scoped_ptr.h" | 16 #include "base/scoped_ptr.h" |
| 17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
| 18 | 18 |
| 19 namespace base { | 19 namespace base { |
| 20 class Time; | 20 class Time; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace net { |
| 24 class URLRequest; |
| 25 } // namespace net |
| 26 |
| 23 class GURL; | 27 class GURL; |
| 24 class URLRequest; | |
| 25 class URLRequestContext; | 28 class URLRequestContext; |
| 26 | 29 |
| 27 namespace fileapi { | 30 namespace fileapi { |
| 28 | 31 |
| 29 class FileSystemCallbackDispatcher; | 32 class FileSystemCallbackDispatcher; |
| 30 class FileWriterDelegate; | 33 class FileWriterDelegate; |
| 31 | 34 |
| 32 // This class is designed to serve one-time file system operation per instance. | 35 // This class is designed to serve one-time file system operation per instance. |
| 33 // Only one method(CreateFile, CreateDirectory, Copy, Move, DirectoryExists, | 36 // Only one method(CreateFile, CreateDirectory, Copy, Move, DirectoryExists, |
| 34 // GetMetadata, ReadDirectory and Remove) may be called during the lifetime of | 37 // GetMetadata, ReadDirectory and Remove) may be called during the lifetime of |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // Proxy for calling file_util_proxy methods. | 146 // Proxy for calling file_util_proxy methods. |
| 144 scoped_refptr<base::MessageLoopProxy> proxy_; | 147 scoped_refptr<base::MessageLoopProxy> proxy_; |
| 145 | 148 |
| 146 scoped_ptr<FileSystemCallbackDispatcher> dispatcher_; | 149 scoped_ptr<FileSystemCallbackDispatcher> dispatcher_; |
| 147 | 150 |
| 148 base::ScopedCallbackFactory<FileSystemOperation> callback_factory_; | 151 base::ScopedCallbackFactory<FileSystemOperation> callback_factory_; |
| 149 | 152 |
| 150 // These are all used only by Write(). | 153 // These are all used only by Write(). |
| 151 friend class FileWriterDelegate; | 154 friend class FileWriterDelegate; |
| 152 scoped_ptr<FileWriterDelegate> file_writer_delegate_; | 155 scoped_ptr<FileWriterDelegate> file_writer_delegate_; |
| 153 scoped_ptr<URLRequest> blob_request_; | 156 scoped_ptr<net::URLRequest> blob_request_; |
| 154 FileSystemOperation* cancel_operation_; | 157 FileSystemOperation* cancel_operation_; |
| 155 | 158 |
| 156 DISALLOW_COPY_AND_ASSIGN(FileSystemOperation); | 159 DISALLOW_COPY_AND_ASSIGN(FileSystemOperation); |
| 157 }; | 160 }; |
| 158 | 161 |
| 159 } // namespace fileapi | 162 } // namespace fileapi |
| 160 | 163 |
| 161 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ | 164 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
| OLD | NEW |