Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(946)

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/metadata_database.h

Issue 23582013: [SyncFS] Add MetadataDatabase::PopulateInitialData (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_METADATA_DATABASE_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 CreateCallback; 117 CreateCallback;
118 118
119 // The entry point of the MetadataDatabase for production code. 119 // The entry point of the MetadataDatabase for production code.
120 static void Create(base::SequencedTaskRunner* task_runner, 120 static void Create(base::SequencedTaskRunner* task_runner,
121 const base::FilePath& database_path, 121 const base::FilePath& database_path,
122 const CreateCallback& callback); 122 const CreateCallback& callback);
123 ~MetadataDatabase(); 123 ~MetadataDatabase();
124 124
125 int64 GetLargestChangeID() const; 125 int64 GetLargestChangeID() const;
126 126
127 bool HasSyncRoot() const;
128
129 void PopulateInitialData(
130 int64 largest_change_id,
131 const google_apis::FileResource& sync_root_folder,
132 const ScopedVector<google_apis::FileResource>& app_root_folders,
133 const SyncStatusCallback& callback);
134
127 // Registers existing folder as the app-root for |app_id|. The folder 135 // Registers existing folder as the app-root for |app_id|. The folder
128 // must be an inactive folder that does not yet associated to any App. 136 // must be an inactive folder that does not yet associated to any App.
129 // This method associates the folder with |app_id| and activates it. 137 // This method associates the folder with |app_id| and activates it.
130 void RegisterApp(const std::string& app_id, 138 void RegisterApp(const std::string& app_id,
131 const std::string& folder_id, 139 const std::string& folder_id,
132 const SyncStatusCallback& callback); 140 const SyncStatusCallback& callback);
133 141
134 // Inactivates the folder associated to the app to disable |app_id|. 142 // Inactivates the folder associated to the app to disable |app_id|.
135 // Does nothing if |app_id| is already disabled. 143 // Does nothing if |app_id| is already disabled.
136 void DisableApp(const std::string& app_id, 144 void DisableApp(const std::string& app_id,
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 320
313 base::WeakPtrFactory<MetadataDatabase> weak_ptr_factory_; 321 base::WeakPtrFactory<MetadataDatabase> weak_ptr_factory_;
314 322
315 DISALLOW_COPY_AND_ASSIGN(MetadataDatabase); 323 DISALLOW_COPY_AND_ASSIGN(MetadataDatabase);
316 }; 324 };
317 325
318 } // namespace drive_backend 326 } // namespace drive_backend
319 } // namespace sync_file_system 327 } // namespace sync_file_system
320 328
321 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_ 329 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698