| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |