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 CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DRIVE_OPERATIONS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DRIVE_OPERATIONS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DRIVE_OPERATIONS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DRIVE_OPERATIONS_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/sequenced_task_runner.h" | 9 #include "base/sequenced_task_runner.h" |
10 #include "chrome/browser/chromeos/drive/drive_file_system_interface.h" | 10 #include "chrome/browser/chromeos/drive/drive_file_system_interface.h" |
11 #include "chrome/browser/chromeos/drive/drive_resource_metadata.h" | 11 #include "chrome/browser/chromeos/drive/drive_resource_metadata.h" |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 class FilePath; | 14 class FilePath; |
15 } | 15 } |
16 | 16 |
17 namespace google_apis { | |
18 class DriveUploaderInterface; | |
19 } | |
20 | |
21 namespace drive { | 17 namespace drive { |
22 | 18 |
23 class DriveCache; | 19 class DriveCache; |
24 class DriveFileSystemInterface; | 20 class DriveFileSystemInterface; |
25 class DriveScheduler; | 21 class DriveScheduler; |
26 | 22 |
27 namespace file_system { | 23 namespace file_system { |
28 | 24 |
29 class CopyOperation; | 25 class CopyOperation; |
30 class CreateDirectoryOperation; | 26 class CreateDirectoryOperation; |
31 class MoveOperation; | 27 class MoveOperation; |
32 class OperationObserver; | 28 class OperationObserver; |
33 class RemoveOperation; | 29 class RemoveOperation; |
34 class UpdateOperation; | 30 class UpdateOperation; |
35 | 31 |
36 // Passes notifications from Drive operations back to the file system. | 32 // Passes notifications from Drive operations back to the file system. |
37 class DriveOperations { | 33 class DriveOperations { |
38 public: | 34 public: |
39 DriveOperations(); | 35 DriveOperations(); |
40 ~DriveOperations(); | 36 ~DriveOperations(); |
41 | 37 |
42 // Allocates the operation objects and initializes the operation pointers. | 38 // Allocates the operation objects and initializes the operation pointers. |
43 void Init(DriveScheduler* drive_scheduler, | 39 void Init(DriveScheduler* drive_scheduler, |
44 DriveFileSystemInterface* drive_file_system, | 40 DriveFileSystemInterface* drive_file_system, |
45 DriveCache* cache, | 41 DriveCache* cache, |
46 DriveResourceMetadata* metadata, | 42 DriveResourceMetadata* metadata, |
47 google_apis::DriveUploaderInterface* uploader, | |
48 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, | 43 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, |
49 OperationObserver* observer); | 44 OperationObserver* observer); |
50 | 45 |
51 // Initializes the operation pointers. For testing only. | 46 // Initializes the operation pointers. For testing only. |
52 void InitForTesting(CopyOperation* copy_operation, | 47 void InitForTesting(CopyOperation* copy_operation, |
53 MoveOperation* move_operation, | 48 MoveOperation* move_operation, |
54 RemoveOperation* remove_operation, | 49 RemoveOperation* remove_operation, |
55 UpdateOperation* update_operation); | 50 UpdateOperation* update_operation); |
56 | 51 |
57 // Wrapper function for create_directory_operation_. | 52 // Wrapper function for create_directory_operation_. |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 scoped_ptr<CreateDirectoryOperation> create_directory_operation_; | 104 scoped_ptr<CreateDirectoryOperation> create_directory_operation_; |
110 scoped_ptr<MoveOperation> move_operation_; | 105 scoped_ptr<MoveOperation> move_operation_; |
111 scoped_ptr<RemoveOperation> remove_operation_; | 106 scoped_ptr<RemoveOperation> remove_operation_; |
112 scoped_ptr<UpdateOperation> update_operation_; | 107 scoped_ptr<UpdateOperation> update_operation_; |
113 }; | 108 }; |
114 | 109 |
115 } // namespace file_system | 110 } // namespace file_system |
116 } // namespace drive | 111 } // namespace drive |
117 | 112 |
118 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DRIVE_OPERATIONS_H_ | 113 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DRIVE_OPERATIONS_H_ |
OLD | NEW |