| 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_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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 void(SyncStatusCode status, scoped_ptr<MetadataDatabase> instance)> | 116 void(SyncStatusCode status, scoped_ptr<MetadataDatabase> instance)> |
| 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 int64 GetSyncRootTrackerID() const; |
| 127 bool HasSyncRoot() const; | 127 bool HasSyncRoot() const; |
| 128 | 128 |
| 129 // Populates empty database with initial data. | 129 // Populates empty database with initial data. |
| 130 // Adds a file metadata and a file tracker for |sync_root_folder|, and adds | 130 // Adds a file metadata and a file tracker for |sync_root_folder|, and adds |
| 131 // file metadata and file trackers for each |app_root_folders|. | 131 // file metadata and file trackers for each |app_root_folders|. |
| 132 // Newly added tracker for |sync_root_folder| is active and non-dirty. | 132 // Newly added tracker for |sync_root_folder| is active and non-dirty. |
| 133 // Newly added trackers for |app_root_folders| are inactive and non-dirty. | 133 // Newly added trackers for |app_root_folders| are inactive and non-dirty. |
| 134 // Trackers for |app_root_folders| are not yet registered as app-roots, but | 134 // Trackers for |app_root_folders| are not yet registered as app-roots, but |
| 135 // are ready to register. | 135 // are ready to register. |
| 136 void PopulateInitialData( | 136 void PopulateInitialData( |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 | 327 |
| 328 base::WeakPtrFactory<MetadataDatabase> weak_ptr_factory_; | 328 base::WeakPtrFactory<MetadataDatabase> weak_ptr_factory_; |
| 329 | 329 |
| 330 DISALLOW_COPY_AND_ASSIGN(MetadataDatabase); | 330 DISALLOW_COPY_AND_ASSIGN(MetadataDatabase); |
| 331 }; | 331 }; |
| 332 | 332 |
| 333 } // namespace drive_backend | 333 } // namespace drive_backend |
| 334 } // namespace sync_file_system | 334 } // namespace sync_file_system |
| 335 | 335 |
| 336 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_ | 336 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_ |
| OLD | NEW |