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

Unified Diff: chrome/browser/sync_file_system/drive_backend/sync_engine.cc

Issue 149683008: [SyncFS] Don't re-run conflict resolution on resolution error (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive_backend/sync_engine.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
index 2b10199657e3d917a980d03f108cafb679524451..066aa8ae8482e97c570d6d3498a2718ae6d63cd7 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
@@ -570,6 +570,7 @@ void SyncEngine::MaybeStartFetchChanges() {
base::TimeTicks now = base::TimeTicks::Now();
if (!should_check_remote_change_ && now < time_to_check_changes_) {
if (!metadata_database_->HasDirtyTracker() && should_check_conflict_) {
+ should_check_conflict_ = false;
task_manager_->ScheduleSyncTaskIfIdle(
scoped_ptr<SyncTask>(new ConflictResolver(this)),
base::Bind(&SyncEngine::DidResolveConflict,
@@ -590,8 +591,8 @@ void SyncEngine::MaybeStartFetchChanges() {
}
void SyncEngine::DidResolveConflict(SyncStatusCode status) {
nhiroki 2014/01/30 04:24:35 How about having "DCHECK(!should_check_conflict_);
nhiroki 2014/01/30 04:53:27 Hmm... this seems overkill...? Anyway, your change
- if (status == SYNC_STATUS_NO_CONFLICT)
- should_check_conflict_ = false;
+ if (status == SYNC_STATUS_OK)
+ should_check_conflict_ = true;
}
void SyncEngine::DidFetchChanges(SyncStatusCode status) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698