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

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

Issue 611323003: [SyncFS] Fix backgrounding race of ConflictResolver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@demotion
Patch Set: Created 6 years, 2 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/conflict_resolver.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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 time_to_check_changes_ = 613 time_to_check_changes_ =
614 now + base::TimeDelta::FromSeconds(kListChangesRetryDelaySeconds); 614 now + base::TimeDelta::FromSeconds(kListChangesRetryDelaySeconds);
615 return true; 615 return true;
616 } 616 }
617 return false; 617 return false;
618 } 618 }
619 619
620 void SyncWorker::DidResolveConflict(SyncStatusCode status) { 620 void SyncWorker::DidResolveConflict(SyncStatusCode status) {
621 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); 621 DCHECK(sequence_checker_.CalledOnValidSequencedThread());
622 622
623 if (status == SYNC_STATUS_OK) 623 if (status == SYNC_STATUS_OK || status == SYNC_STATUS_RETRY)
624 should_check_conflict_ = true; 624 should_check_conflict_ = true;
625 } 625 }
626 626
627 void SyncWorker::DidFetchChanges(SyncStatusCode status) { 627 void SyncWorker::DidFetchChanges(SyncStatusCode status) {
628 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); 628 DCHECK(sequence_checker_.CalledOnValidSequencedThread());
629 629
630 if (status == SYNC_STATUS_OK) 630 if (status == SYNC_STATUS_OK)
631 should_check_conflict_ = true; 631 should_check_conflict_ = true;
632 listing_remote_changes_ = false; 632 listing_remote_changes_ = false;
633 } 633 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 return context_->GetDriveUploader(); 717 return context_->GetDriveUploader();
718 } 718 }
719 719
720 MetadataDatabase* SyncWorker::GetMetadataDatabase() { 720 MetadataDatabase* SyncWorker::GetMetadataDatabase() {
721 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); 721 DCHECK(sequence_checker_.CalledOnValidSequencedThread());
722 return context_->GetMetadataDatabase(); 722 return context_->GetMetadataDatabase();
723 } 723 }
724 724
725 } // namespace drive_backend 725 } // namespace drive_backend
726 } // namespace sync_file_system 726 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/conflict_resolver.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698