OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/files/file.h" | 11 #include "base/files/file.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/process/process.h" | 13 #include "base/process/process.h" |
14 #include "webkit/browser/fileapi/file_system_operation_context.h" | 14 #include "webkit/browser/fileapi/file_system_operation_context.h" |
15 #include "webkit/browser/webkit_storage_browser_export.h" | 15 #include "webkit/browser/storage_export.h" |
16 #include "webkit/common/fileapi/directory_entry.h" | 16 #include "webkit/common/fileapi/directory_entry.h" |
17 | 17 |
18 namespace base { | 18 namespace base { |
19 class Time; | 19 class Time; |
20 } | 20 } |
21 | 21 |
22 namespace net { | 22 namespace net { |
23 class URLRequest; | 23 class URLRequest; |
24 } | 24 } |
25 | 25 |
(...skipping 25 matching lines...) Expand all Loading... |
51 // lifetime of this object and it should be called no more than once. | 51 // lifetime of this object and it should be called no more than once. |
52 // | 52 // |
53 // 2) Deliver the results of operations to the client via the callback function | 53 // 2) Deliver the results of operations to the client via the callback function |
54 // passed as the last parameter of the method. | 54 // passed as the last parameter of the method. |
55 // | 55 // |
56 // Note that it is valid to delete an operation while it is running. | 56 // Note that it is valid to delete an operation while it is running. |
57 // The callback will NOT be fired if the operation is deleted before | 57 // The callback will NOT be fired if the operation is deleted before |
58 // it gets called. | 58 // it gets called. |
59 class FileSystemOperation { | 59 class FileSystemOperation { |
60 public: | 60 public: |
61 WEBKIT_STORAGE_BROWSER_EXPORT static FileSystemOperation* Create( | 61 STORAGE_EXPORT static FileSystemOperation* Create( |
62 const FileSystemURL& url, | 62 const FileSystemURL& url, |
63 FileSystemContext* file_system_context, | 63 FileSystemContext* file_system_context, |
64 scoped_ptr<FileSystemOperationContext> operation_context); | 64 scoped_ptr<FileSystemOperationContext> operation_context); |
65 | 65 |
66 virtual ~FileSystemOperation() {} | 66 virtual ~FileSystemOperation() {} |
67 | 67 |
68 // Used for CreateFile(), etc. |result| is the return code of the operation. | 68 // Used for CreateFile(), etc. |result| is the return code of the operation. |
69 typedef base::Callback<void(base::File::Error result)> StatusCallback; | 69 typedef base::Callback<void(base::File::Error result)> StatusCallback; |
70 | 70 |
71 // Used for GetMetadata(). |result| is the return code of the operation, | 71 // Used for GetMetadata(). |result| is the return code of the operation, |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 kOperationOpenFile, | 476 kOperationOpenFile, |
477 kOperationCloseFile, | 477 kOperationCloseFile, |
478 kOperationGetLocalPath, | 478 kOperationGetLocalPath, |
479 kOperationCancel, | 479 kOperationCancel, |
480 }; | 480 }; |
481 }; | 481 }; |
482 | 482 |
483 } // namespace storage | 483 } // namespace storage |
484 | 484 |
485 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_ | 485 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
OLD | NEW |