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_INITIALIZER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_INITIALIZER_H_ |
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_INITIALIZER_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_INITIALIZER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // as regular inactive folders until they are registered explicitly. | 63 // as regular inactive folders until they are registered explicitly. |
64 // - Populate database with the largest change ID, the sync-root folder and | 64 // - Populate database with the largest change ID, the sync-root folder and |
65 // its contents. | 65 // its contents. |
66 // | 66 // |
67 class SyncEngineInitializer : public SyncTask { | 67 class SyncEngineInitializer : public SyncTask { |
68 public: | 68 public: |
69 SyncEngineInitializer(SyncEngineContext* sync_context, | 69 SyncEngineInitializer(SyncEngineContext* sync_context, |
70 const base::FilePath& database_path, | 70 const base::FilePath& database_path, |
71 leveldb::Env* env_override); | 71 leveldb::Env* env_override); |
72 virtual ~SyncEngineInitializer(); | 72 virtual ~SyncEngineInitializer(); |
73 virtual void RunPreflight(scoped_ptr<SyncTaskToken> token) OVERRIDE; | 73 virtual void RunPreflight(scoped_ptr<SyncTaskToken> token) override; |
74 | 74 |
75 scoped_ptr<MetadataDatabase> PassMetadataDatabase(); | 75 scoped_ptr<MetadataDatabase> PassMetadataDatabase(); |
76 | 76 |
77 private: | 77 private: |
78 typedef base::Callback<void(const SyncStatusCallback& callback)> Task; | 78 typedef base::Callback<void(const SyncStatusCallback& callback)> Task; |
79 | 79 |
80 void GetAboutResource(scoped_ptr<SyncTaskToken> token); | 80 void GetAboutResource(scoped_ptr<SyncTaskToken> token); |
81 void DidGetAboutResource( | 81 void DidGetAboutResource( |
82 scoped_ptr<SyncTaskToken> token, | 82 scoped_ptr<SyncTaskToken> token, |
83 google_apis::GDataErrorCode error, | 83 google_apis::GDataErrorCode error, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 base::WeakPtrFactory<SyncEngineInitializer> weak_ptr_factory_; | 119 base::WeakPtrFactory<SyncEngineInitializer> weak_ptr_factory_; |
120 | 120 |
121 DISALLOW_COPY_AND_ASSIGN(SyncEngineInitializer); | 121 DISALLOW_COPY_AND_ASSIGN(SyncEngineInitializer); |
122 }; | 122 }; |
123 | 123 |
124 } // namespace drive_backend | 124 } // namespace drive_backend |
125 } // namespace sync_file_system | 125 } // namespace sync_file_system |
126 | 126 |
127 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_INITIALIZER
_H_ | 127 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_ENGINE_INITIALIZER
_H_ |
OLD | NEW |