OLD | NEW |
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/local_to_remote_syncer.h
" | 5 #include "chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.h
" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 int64 latest_change_id = 0; | 297 int64 latest_change_id = 0; |
298 if (!GetKnownChangeID(metadata_database(), | 298 if (!GetKnownChangeID(metadata_database(), |
299 remote_file_tracker_->file_id(), | 299 remote_file_tracker_->file_id(), |
300 &latest_change_id) || | 300 &latest_change_id) || |
301 latest_change_id > remote_file_change_id_) { | 301 latest_change_id > remote_file_change_id_) { |
302 SyncCompleted(token.Pass(), SYNC_STATUS_RETRY); | 302 SyncCompleted(token.Pass(), SYNC_STATUS_RETRY); |
303 return; | 303 return; |
304 } | 304 } |
305 | 305 |
306 if (!metadata_database()->FindTrackerByTrackerID( | 306 if (!metadata_database()->FindTrackerByTrackerID( |
307 remote_file_tracker_->tracker_id(), NULL)) { | 307 remote_file_tracker_->tracker_id(), nullptr)) { |
308 SyncCompleted(token.Pass(), SYNC_STATUS_RETRY); | 308 SyncCompleted(token.Pass(), SYNC_STATUS_RETRY); |
309 return; | 309 return; |
310 } | 310 } |
311 } | 311 } |
312 | 312 |
313 continuation.Run(token.Pass()); | 313 continuation.Run(token.Pass()); |
314 } | 314 } |
315 | 315 |
316 void LocalToRemoteSyncer::SyncCompleted(scoped_ptr<SyncTaskToken> token, | 316 void LocalToRemoteSyncer::SyncCompleted(scoped_ptr<SyncTaskToken> token, |
317 SyncStatusCode status) { | 317 SyncStatusCode status) { |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 set_used_network(true); | 745 set_used_network(true); |
746 return sync_context_->GetDriveUploader(); | 746 return sync_context_->GetDriveUploader(); |
747 } | 747 } |
748 | 748 |
749 MetadataDatabase* LocalToRemoteSyncer::metadata_database() { | 749 MetadataDatabase* LocalToRemoteSyncer::metadata_database() { |
750 return sync_context_->GetMetadataDatabase(); | 750 return sync_context_->GetMetadataDatabase(); |
751 } | 751 } |
752 | 752 |
753 } // namespace drive_backend | 753 } // namespace drive_backend |
754 } // namespace sync_file_system | 754 } // namespace sync_file_system |
OLD | NEW |