| 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_LOCAL_FILE_SYSTEM_OPERATION_H_ | 5 #ifndef WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_OPERATION_H_ |
| 6 #define WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_OPERATION_H_ | 6 #define WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_OPERATION_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 SetUpMode mode); | 235 SetUpMode mode); |
| 236 | 236 |
| 237 // Used only for internal assertions. | 237 // Used only for internal assertions. |
| 238 // Returns false if there's another inflight pending operation. | 238 // Returns false if there's another inflight pending operation. |
| 239 bool SetPendingOperationType(OperationType type); | 239 bool SetPendingOperationType(OperationType type); |
| 240 | 240 |
| 241 scoped_ptr<FileSystemOperationContext> operation_context_; | 241 scoped_ptr<FileSystemOperationContext> operation_context_; |
| 242 FileSystemFileUtil* src_util_; // Not owned. | 242 FileSystemFileUtil* src_util_; // Not owned. |
| 243 FileSystemFileUtil* dest_util_; // Not owned. | 243 FileSystemFileUtil* dest_util_; // Not owned. |
| 244 | 244 |
| 245 // Indicates if this operation is for cross filesystem operation or not. |
| 246 // TODO(kinuko): This should be cleaned up. |
| 247 bool is_cross_operation_; |
| 248 |
| 245 // This is set before any write operations to dispatch | 249 // This is set before any write operations to dispatch |
| 246 // FileUpdateObserver::StartUpdate and FileUpdateObserver::EndUpdate. | 250 // FileUpdateObserver::StartUpdate and FileUpdateObserver::EndUpdate. |
| 247 ScopedVector<ScopedUpdateNotifier> scoped_update_notifiers_; | 251 ScopedVector<ScopedUpdateNotifier> scoped_update_notifiers_; |
| 248 | 252 |
| 249 // These are all used only by Write(). | 253 // These are all used only by Write(). |
| 250 friend class FileWriterDelegate; | 254 friend class FileWriterDelegate; |
| 251 scoped_ptr<FileWriterDelegate> file_writer_delegate_; | 255 scoped_ptr<FileWriterDelegate> file_writer_delegate_; |
| 252 | 256 |
| 253 // write_callback is kept in this class for so that we can dispatch it when | 257 // write_callback is kept in this class for so that we can dispatch it when |
| 254 // the operation is cancelled. calcel_callback is kept for canceling a | 258 // the operation is cancelled. calcel_callback is kept for canceling a |
| (...skipping 15 matching lines...) Expand all Loading... |
| 270 // LocalFileSystemOperation instance is usually deleted upon completion but | 274 // LocalFileSystemOperation instance is usually deleted upon completion but |
| 271 // could be deleted while it has inflight callbacks when Cancel is called. | 275 // could be deleted while it has inflight callbacks when Cancel is called. |
| 272 base::WeakPtrFactory<LocalFileSystemOperation> weak_factory_; | 276 base::WeakPtrFactory<LocalFileSystemOperation> weak_factory_; |
| 273 | 277 |
| 274 DISALLOW_COPY_AND_ASSIGN(LocalFileSystemOperation); | 278 DISALLOW_COPY_AND_ASSIGN(LocalFileSystemOperation); |
| 275 }; | 279 }; |
| 276 | 280 |
| 277 } // namespace fileapi | 281 } // namespace fileapi |
| 278 | 282 |
| 279 #endif // WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_OPERATION_H_ | 283 #endif // WEBKIT_FILEAPI_LOCAL_FILE_SYSTEM_OPERATION_H_ |
| OLD | NEW |