OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_CONTEXT_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_CONTEXT_H_ |
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_CONTEXT_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_CONTEXT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | |
10 #include "base/memory/scoped_ptr.h" | |
9 | 11 |
10 namespace base { | 12 namespace base { |
11 class SequencedTaskRunner; | 13 class SequencedTaskRunner; |
12 } | 14 } // namespace base |
tzik
2014/03/27 07:41:03
We usually don't add "// namespace xxx" for forwar
peria
2014/03/27 10:14:37
Done.
| |
13 | 15 |
14 namespace drive { | 16 namespace drive { |
15 class DriveServiceInterface; | 17 class DriveServiceInterface; |
16 class DriveUploaderInterface; | 18 class DriveUploaderInterface; |
17 } | 19 } // namespace drive |
18 | 20 |
19 namespace sync_file_system { | 21 namespace sync_file_system { |
20 | 22 |
21 class RemoteChangeProcessor; | 23 class RemoteChangeProcessor; |
22 | 24 |
23 namespace drive_backend { | 25 namespace drive_backend { |
24 | 26 |
25 class MetadataDatabase; | 27 class MetadataDatabase; |
26 | 28 |
27 class SyncEngineContext { | 29 class SyncEngineContext { |
28 public: | 30 public: |
29 SyncEngineContext() {} | 31 SyncEngineContext() {} |
30 ~SyncEngineContext() {} | 32 ~SyncEngineContext() {} |
tzik
2014/03/27 07:41:03
I think these ctor and dtor need to be out-of-line
peria
2014/03/27 10:14:37
Done.
| |
31 | 33 |
32 virtual drive::DriveServiceInterface* GetDriveService() = 0; | 34 drive::DriveServiceInterface* GetDriveService(); |
33 virtual drive::DriveUploaderInterface* GetDriveUploader() = 0; | 35 drive::DriveUploaderInterface* GetDriveUploader(); |
34 virtual MetadataDatabase* GetMetadataDatabase() = 0; | 36 MetadataDatabase* GetMetadataDatabase(); |
35 virtual RemoteChangeProcessor* GetRemoteChangeProcessor() = 0; | 37 RemoteChangeProcessor* GetRemoteChangeProcessor(); |
36 virtual base::SequencedTaskRunner* GetBlockingTaskRunner() = 0; | 38 base::SequencedTaskRunner* GetBlockingTaskRunner(); |
39 | |
40 // TODO(peria): Remove those setters. | |
tzik
2014/03/27 07:41:03
Could you address this in this CL?
peria
2014/03/27 10:14:37
Done.
Setter for MetadataDatabase is needed in the
| |
41 void SetMetadataDatabase(scoped_ptr<MetadataDatabase> metadata_database); | |
42 void SetDriveService(scoped_ptr<drive::DriveServiceInterface> drive_service); | |
43 void SetDriveUploader(scoped_ptr<drive::DriveUploaderInterface> uploader); | |
44 void SetRemoteChangeProcessor(RemoteChangeProcessor* remote_change_processor); | |
45 void SetSequencedTaskRunner(base::SequencedTaskRunner* runner); | |
46 | |
47 scoped_ptr<MetadataDatabase> PassMetadataDatabase(); | |
37 | 48 |
38 private: | 49 private: |
50 scoped_ptr<drive::DriveServiceInterface> drive_service_; | |
51 scoped_ptr<drive::DriveUploaderInterface> drive_uploader_; | |
52 scoped_ptr<MetadataDatabase> metadata_database_; | |
53 RemoteChangeProcessor* remote_change_processor_; | |
54 scoped_refptr<base::SequencedTaskRunner> task_runner_; | |
55 | |
39 DISALLOW_COPY_AND_ASSIGN(SyncEngineContext); | 56 DISALLOW_COPY_AND_ASSIGN(SyncEngineContext); |
40 }; | 57 }; |
41 | 58 |
42 } // namespace drive_backend | 59 } // namespace drive_backend |
43 } // namespace sync_file_system | 60 } // namespace sync_file_system |
44 | 61 |
45 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_CONTEXT_H_ | 62 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_CONTEXT_H_ |
OLD | NEW |