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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/sync_worker.cc

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
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "chrome/browser/sync_file_system/drive_backend/sync_worker.h" 5 #include "chrome/browser/sync_file_system/drive_backend/sync_worker.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "chrome/browser/drive/drive_service_interface.h" 10 #include "chrome/browser/drive/drive_service_interface.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 observers_, 227 observers_,
228 UpdateServiceState( 228 UpdateServiceState(
229 GetCurrentState(), 229 GetCurrentState(),
230 enabled ? "Sync is enabled" : "Sync is disabled")); 230 enabled ? "Sync is enabled" : "Sync is disabled"));
231 } 231 }
232 232
233 void SyncWorker::PromoteDemotedChanges(const base::Closure& callback) { 233 void SyncWorker::PromoteDemotedChanges(const base::Closure& callback) {
234 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); 234 DCHECK(sequence_checker_.CalledOnValidSequencedThread());
235 235
236 MetadataDatabase* metadata_db = GetMetadataDatabase(); 236 MetadataDatabase* metadata_db = GetMetadataDatabase();
237 if (metadata_db && metadata_db->HasLowPriorityDirtyTracker()) { 237 if (metadata_db && metadata_db->HasDemotedDirtyTracker()) {
238 metadata_db->PromoteLowerPriorityTrackersToNormal(); 238 metadata_db->PromoteDemotedTrackers();
239 FOR_EACH_OBSERVER( 239 FOR_EACH_OBSERVER(
240 Observer, 240 Observer,
241 observers_, 241 observers_,
242 OnPendingFileListUpdated(metadata_db->CountDirtyTracker())); 242 OnPendingFileListUpdated(metadata_db->CountDirtyTracker()));
243 } 243 }
244 callback.Run(); 244 callback.Run();
245 } 245 }
246 246
247 void SyncWorker::ApplyLocalChange(const FileChange& local_change, 247 void SyncWorker::ApplyLocalChange(const FileChange& local_change,
248 const base::FilePath& local_path, 248 const base::FilePath& local_path,
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 return context_->GetDriveUploader(); 711 return context_->GetDriveUploader();
712 } 712 }
713 713
714 MetadataDatabase* SyncWorker::GetMetadataDatabase() { 714 MetadataDatabase* SyncWorker::GetMetadataDatabase() {
715 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); 715 DCHECK(sequence_checker_.CalledOnValidSequencedThread());
716 return context_->GetMetadataDatabase(); 716 return context_->GetMetadataDatabase();
717 } 717 }
718 718
719 } // namespace drive_backend 719 } // namespace drive_backend
720 } // namespace sync_file_system 720 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698