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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 // If the tracker has no further change to sync, unmarks its dirty flag. | 217 // If the tracker has no further change to sync, unmarks its dirty flag. |
218 void PopulateFolderByChildList(const std::string& folder_id, | 218 void PopulateFolderByChildList(const std::string& folder_id, |
219 const FileIDList& child_file_ids, | 219 const FileIDList& child_file_ids, |
220 const SyncStatusCallback& callback); | 220 const SyncStatusCallback& callback); |
221 | 221 |
222 // Updates |synced_details| of the tracker with |updated_details|. | 222 // Updates |synced_details| of the tracker with |updated_details|. |
223 void UpdateTracker(int64 tracker_id, | 223 void UpdateTracker(int64 tracker_id, |
224 const FileDetails& updated_details, | 224 const FileDetails& updated_details, |
225 const SyncStatusCallback& callback); | 225 const SyncStatusCallback& callback); |
226 | 226 |
| 227 // Returns true if there is a normal priority dirty tracker. |
| 228 // Assigns the dirty tracker if exists and |tracker| is non-NULL. |
| 229 bool GetNormalPriorityDirtyTracker(FileTracker* tracker); |
| 230 |
| 231 // Returns true if there is a low priority dirty tracker. |
| 232 // Assigns the dirty tracker if exists and |tracker| is non-NULL. |
| 233 bool GetLowPriorityDirtyTracker(FileTracker* tracker); |
| 234 |
227 private: | 235 private: |
228 friend class ListChangesTaskTest; | 236 friend class ListChangesTaskTest; |
229 friend class MetadataDatabaseTest; | 237 friend class MetadataDatabaseTest; |
230 friend class RegisterAppTaskTest; | 238 friend class RegisterAppTaskTest; |
231 friend class SyncEngineInitializerTest; | 239 friend class SyncEngineInitializerTest; |
232 | 240 |
233 struct DirtyTrackerComparator { | 241 struct DirtyTrackerComparator { |
234 bool operator()(const FileTracker* left, | 242 bool operator()(const FileTracker* left, |
235 const FileTracker* right) const; | 243 const FileTracker* right) const; |
236 }; | 244 }; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 | 349 |
342 base::WeakPtrFactory<MetadataDatabase> weak_ptr_factory_; | 350 base::WeakPtrFactory<MetadataDatabase> weak_ptr_factory_; |
343 | 351 |
344 DISALLOW_COPY_AND_ASSIGN(MetadataDatabase); | 352 DISALLOW_COPY_AND_ASSIGN(MetadataDatabase); |
345 }; | 353 }; |
346 | 354 |
347 } // namespace drive_backend | 355 } // namespace drive_backend |
348 } // namespace sync_file_system | 356 } // namespace sync_file_system |
349 | 357 |
350 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_ | 358 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_ |
OLD | NEW |