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

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

Issue 551763002: [SyncFS] Rephrase "LowerPriority" to "Demoted" in MetadataDatabase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@task_blocker
Patch Set: rebase Created 6 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
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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 // completion. 315 // completion.
316 // 316 //
317 // The tracker to be activated must: 317 // The tracker to be activated must:
318 // - have a tracked metadata in the database, 318 // - have a tracked metadata in the database,
319 // - have |synced_details| with valid |title|. 319 // - have |synced_details| with valid |title|.
320 ActivationStatus TryActivateTracker(int64 parent_tracker_id, 320 ActivationStatus TryActivateTracker(int64 parent_tracker_id,
321 const std::string& file_id, 321 const std::string& file_id,
322 const SyncStatusCallback& callback); 322 const SyncStatusCallback& callback);
323 323
324 // Changes the priority of the tracker to low. 324 // Changes the priority of the tracker to low.
325 void LowerTrackerPriority(int64 tracker_id); 325 void DemoteTracker(int64 tracker_id);
326 bool PromoteLowerPriorityTrackersToNormal(); 326 bool PromoteDemotedTrackers();
327
328 void PromoteDemotedTracker(int64 tracker_id); 327 void PromoteDemotedTracker(int64 tracker_id);
329 328
330 // Returns true if there is a normal priority dirty tracker. 329 // Returns true if there is a normal priority dirty tracker.
331 // Assigns the dirty tracker if exists and |tracker| is non-NULL. 330 // Assigns the dirty tracker if exists and |tracker| is non-NULL.
332 bool GetNormalPriorityDirtyTracker(FileTracker* tracker) const; 331 bool GetDirtyTracker(FileTracker* tracker) const;
333 332
334 // Returns true if there is a low priority dirty tracker. 333 // Returns true if there is a low priority dirty tracker.
335 bool HasLowPriorityDirtyTracker() const; 334 bool HasDemotedDirtyTracker() const;
336 335
337 bool HasDirtyTracker() const; 336 bool HasDirtyTracker() const;
338 size_t CountDirtyTracker() const; 337 size_t CountDirtyTracker() const;
339 size_t CountFileMetadata() const; 338 size_t CountFileMetadata() const;
340 size_t CountFileTracker() const; 339 size_t CountFileTracker() const;
341 340
342 bool GetMultiParentFileTrackers(std::string* file_id, 341 bool GetMultiParentFileTrackers(std::string* file_id,
343 TrackerIDSet* trackers); 342 TrackerIDSet* trackers);
344 bool GetConflictingTrackers(TrackerIDSet* trackers); 343 bool GetConflictingTrackers(TrackerIDSet* trackers);
345 344
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 425
427 base::SequenceChecker worker_sequence_checker_; 426 base::SequenceChecker worker_sequence_checker_;
428 427
429 DISALLOW_COPY_AND_ASSIGN(MetadataDatabase); 428 DISALLOW_COPY_AND_ASSIGN(MetadataDatabase);
430 }; 429 };
431 430
432 } // namespace drive_backend 431 } // namespace drive_backend
433 } // namespace sync_file_system 432 } // namespace sync_file_system
434 433
435 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_ 434 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_METADATA_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698