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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.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 | « no previous file | chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/sync_file_system/drive_backend/conflict_resolver.h" 5 #include "chrome/browser/sync_file_system/drive_backend/conflict_resolver.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 const int kRetryLimit = 100; 210 const int kRetryLimit = 100;
211 SyncStatusCode status; 211 SyncStatusCode status;
212 int retry_count = 0; 212 int retry_count = 0;
213 MetadataDatabase* metadata_database = context_->GetMetadataDatabase(); 213 MetadataDatabase* metadata_database = context_->GetMetadataDatabase();
214 do { 214 do {
215 if (retry_count++ > kRetryLimit) 215 if (retry_count++ > kRetryLimit)
216 break; 216 break;
217 status = RunRemoteToLocalSyncer(); 217 status = RunRemoteToLocalSyncer();
218 } while (status == SYNC_STATUS_OK || 218 } while (status == SYNC_STATUS_OK ||
219 status == SYNC_STATUS_RETRY || 219 status == SYNC_STATUS_RETRY ||
220 metadata_database->PromoteLowerPriorityTrackersToNormal()); 220 metadata_database->PromoteDemotedTrackers());
221 EXPECT_EQ(SYNC_STATUS_NO_CHANGE_TO_SYNC, status); 221 EXPECT_EQ(SYNC_STATUS_NO_CHANGE_TO_SYNC, status);
222 } 222 }
223 223
224 SyncStatusCode RunConflictResolver() { 224 SyncStatusCode RunConflictResolver() {
225 SyncStatusCode status = SYNC_STATUS_UNKNOWN; 225 SyncStatusCode status = SYNC_STATUS_UNKNOWN;
226 ConflictResolver resolver(context_.get()); 226 ConflictResolver resolver(context_.get());
227 resolver.RunPreflight(SyncTaskToken::CreateForTesting( 227 resolver.RunPreflight(SyncTaskToken::CreateForTesting(
228 CreateResultReceiver(&status))); 228 CreateResultReceiver(&status)));
229 base::RunLoop().RunUntilIdle(); 229 base::RunLoop().RunUntilIdle();
230 return status; 230 return status;
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 520
521 EXPECT_EQ(4, CountParents(file)); 521 EXPECT_EQ(4, CountParents(file));
522 522
523 EXPECT_EQ(SYNC_STATUS_OK, RunConflictResolver()); 523 EXPECT_EQ(SYNC_STATUS_OK, RunConflictResolver());
524 524
525 EXPECT_EQ(1, CountParents(file)); 525 EXPECT_EQ(1, CountParents(file));
526 } 526 }
527 527
528 } // namespace drive_backend 528 } // namespace drive_backend
529 } // namespace sync_file_system 529 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698