| 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_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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 FileSystemType type; | 114 FileSystemType type; |
| 115 base::Closure task; | 115 base::Closure task; |
| 116 base::Closure error_callback; | 116 base::Closure error_callback; |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 // Only MountPointProviders or testing class can create a | 119 // Only MountPointProviders or testing class can create a |
| 120 // new operation directly. | 120 // new operation directly. |
| 121 friend class FileSystemTestHelper; | 121 friend class FileSystemTestHelper; |
| 122 friend class IsolatedMountPointProvider; | 122 friend class IsolatedMountPointProvider; |
| 123 friend class SandboxMountPointProvider; | 123 friend class SandboxMountPointProvider; |
| 124 friend class TestMountPointProvider; |
| 124 friend class chromeos::CrosMountPointProvider; | 125 friend class chromeos::CrosMountPointProvider; |
| 125 | 126 |
| 126 friend class FileSystemOperationTest; | 127 friend class FileSystemOperationTest; |
| 127 friend class FileSystemOperationWriteTest; | 128 friend class FileSystemOperationWriteTest; |
| 128 friend class FileWriterDelegateTest; | 129 friend class FileWriterDelegateTest; |
| 129 friend class FileSystemTestOriginHelper; | 130 friend class FileSystemTestOriginHelper; |
| 130 friend class FileSystemQuotaTest; | 131 friend class FileSystemQuotaTest; |
| 131 | 132 |
| 132 FileSystemOperation(FileSystemContext* file_system_context); | 133 explicit FileSystemOperation(FileSystemContext* file_system_context); |
| 133 | 134 |
| 134 FileSystemContext* file_system_context() const { | 135 FileSystemContext* file_system_context() const { |
| 135 return operation_context_.file_system_context(); | 136 return operation_context_.file_system_context(); |
| 136 } | 137 } |
| 137 | 138 |
| 138 FileSystemOperationContext* file_system_operation_context() { | 139 FileSystemOperationContext* file_system_operation_context() { |
| 139 return &operation_context_; | 140 return &operation_context_; |
| 140 } | 141 } |
| 141 | 142 |
| 142 // The unit tests that need to specify and control the lifetime of the | 143 // The unit tests that need to specify and control the lifetime of the |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 // FileSystemOperation instance is usually deleted upon completion but | 273 // FileSystemOperation instance is usually deleted upon completion but |
| 273 // could be deleted while it has inflight callbacks when Cancel is called. | 274 // could be deleted while it has inflight callbacks when Cancel is called. |
| 274 base::WeakPtrFactory<FileSystemOperation> weak_factory_; | 275 base::WeakPtrFactory<FileSystemOperation> weak_factory_; |
| 275 | 276 |
| 276 DISALLOW_COPY_AND_ASSIGN(FileSystemOperation); | 277 DISALLOW_COPY_AND_ASSIGN(FileSystemOperation); |
| 277 }; | 278 }; |
| 278 | 279 |
| 279 } // namespace fileapi | 280 } // namespace fileapi |
| 280 | 281 |
| 281 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ | 282 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
| OLD | NEW |