| 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 // | 315 // |
| 316 // The tracker to be activated must: | 316 // The tracker to be activated must: |
| 317 // - have a tracked metadata in the database, | 317 // - have a tracked metadata in the database, |
| 318 // - have |synced_details| with valid |title|. | 318 // - have |synced_details| with valid |title|. |
| 319 ActivationStatus TryActivateTracker(int64 parent_tracker_id, | 319 ActivationStatus TryActivateTracker(int64 parent_tracker_id, |
| 320 const std::string& file_id, | 320 const std::string& file_id, |
| 321 const SyncStatusCallback& callback); | 321 const SyncStatusCallback& callback); |
| 322 | 322 |
| 323 // Changes the priority of the tracker to low. | 323 // Changes the priority of the tracker to low. |
| 324 void LowerTrackerPriority(int64 tracker_id); | 324 void LowerTrackerPriority(int64 tracker_id); |
| 325 void PromoteLowerPriorityTrackersToNormal(); | 325 bool PromoteLowerPriorityTrackersToNormal(); |
| 326 |
| 327 void PromoteDemotedTracker(int64 tracker_id); |
| 326 | 328 |
| 327 // Returns true if there is a normal priority dirty tracker. | 329 // Returns true if there is a normal priority dirty tracker. |
| 328 // Assigns the dirty tracker if exists and |tracker| is non-NULL. | 330 // Assigns the dirty tracker if exists and |tracker| is non-NULL. |
| 329 bool GetNormalPriorityDirtyTracker(FileTracker* tracker) const; | 331 bool GetNormalPriorityDirtyTracker(FileTracker* tracker) const; |
| 330 | 332 |
| 331 // Returns true if there is a low priority dirty tracker. | 333 // Returns true if there is a low priority dirty tracker. |
| 332 bool HasLowPriorityDirtyTracker() const; | 334 bool HasLowPriorityDirtyTracker() const; |
| 333 | 335 |
| 334 bool HasDirtyTracker() const; | 336 bool HasDirtyTracker() const; |
| 335 size_t CountDirtyTracker() const; | 337 size_t CountDirtyTracker() const; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 | 418 |
| 417 base::SequenceChecker worker_sequence_checker_; | 419 base::SequenceChecker worker_sequence_checker_; |
| 418 | 420 |
| 419 DISALLOW_COPY_AND_ASSIGN(MetadataDatabase); | 421 DISALLOW_COPY_AND_ASSIGN(MetadataDatabase); |
| 420 }; | 422 }; |
| 421 | 423 |
| 422 } // namespace drive_backend | 424 } // namespace drive_backend |
| 423 } // namespace sync_file_system | 425 } // namespace sync_file_system |
| 424 | 426 |
| 425 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_ | 427 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_ |
| OLD | NEW |