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

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

Issue 560703002: [SyncFS] Expand simple functions to their caller in drive_backend/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@03_context_rename
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
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/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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 } 541 }
542 542
543 if (!entry) { 543 if (!entry) {
544 NOTREACHED(); 544 NOTREACHED();
545 SyncCompleted(token.Pass(), SYNC_STATUS_FAILED); 545 SyncCompleted(token.Pass(), SYNC_STATUS_FAILED);
546 return; 546 return;
547 } 547 }
548 548
549 DCHECK(entry); 549 DCHECK(entry);
550 status = metadata_database()->UpdateByFileResource(*entry); 550 status = metadata_database()->UpdateByFileResource(*entry);
551
552 // TODO(tzik): Expand this function.
553 DidUpdateDatabaseForUploadExistingFile(token.Pass(), status);
554 }
555
556 void LocalToRemoteSyncer::DidUpdateDatabaseForUploadExistingFile(
557 scoped_ptr<SyncTaskToken> token,
558 SyncStatusCode status) {
559 if (status != SYNC_STATUS_OK) { 551 if (status != SYNC_STATUS_OK) {
560 SyncCompleted(token.Pass(), status); 552 SyncCompleted(token.Pass(), status);
561 return; 553 return;
562 } 554 }
563 555
564 FileMetadata file; 556 FileMetadata file;
565 if (!metadata_database()->FindFileByFileID( 557 if (!metadata_database()->FindFileByFileID(
566 remote_file_tracker_->file_id(), &file)) { 558 remote_file_tracker_->file_id(), &file)) {
567 NOTREACHED(); 559 NOTREACHED();
568 SyncCompleted(token.Pass(), SYNC_STATUS_FAILED); 560 SyncCompleted(token.Pass(), SYNC_STATUS_FAILED);
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 set_used_network(true); 746 set_used_network(true);
755 return sync_context_->GetDriveUploader(); 747 return sync_context_->GetDriveUploader();
756 } 748 }
757 749
758 MetadataDatabase* LocalToRemoteSyncer::metadata_database() { 750 MetadataDatabase* LocalToRemoteSyncer::metadata_database() {
759 return sync_context_->GetMetadataDatabase(); 751 return sync_context_->GetMetadataDatabase();
760 } 752 }
761 753
762 } // namespace drive_backend 754 } // namespace drive_backend
763 } // namespace sync_file_system 755 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698