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

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

Issue 2613223002: Remove ScopedVector from base::JSONValueConverter (Closed)
Patch Set: Created 3 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 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/remote_to_local_syncer.h " 5 #include "chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.h "
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <utility> 10 #include <utility>
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 return; 669 return;
670 } 670 }
671 671
672 if (!file_list) { 672 if (!file_list) {
673 NOTREACHED(); 673 NOTREACHED();
674 SyncCompleted(std::move(token), SYNC_STATUS_FAILED); 674 SyncCompleted(std::move(token), SYNC_STATUS_FAILED);
675 return; 675 return;
676 } 676 }
677 677
678 children->reserve(children->size() + file_list->items().size()); 678 children->reserve(children->size() + file_list->items().size());
679 for (ScopedVector<google_apis::FileResource>::const_iterator itr = 679 for (const auto& file_resource : file_list->items()) {
680 file_list->items().begin(); 680 children->push_back(file_resource->file_id());
681 itr != file_list->items().end();
682 ++itr) {
683 children->push_back((*itr)->file_id());
684 } 681 }
685 682
686 if (!file_list->next_link().is_empty()) { 683 if (!file_list->next_link().is_empty()) {
687 drive_service()->GetRemainingFileList( 684 drive_service()->GetRemainingFileList(
688 file_list->next_link(), 685 file_list->next_link(),
689 base::Bind(&RemoteToLocalSyncer::DidListFolderContent, 686 base::Bind(&RemoteToLocalSyncer::DidListFolderContent,
690 weak_ptr_factory_.GetWeakPtr(), 687 weak_ptr_factory_.GetWeakPtr(),
691 base::Passed(&token), base::Passed(&children))); 688 base::Passed(&token), base::Passed(&children)));
692 return; 689 return;
693 } 690 }
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 860
864 SyncStatusCallback RemoteToLocalSyncer::SyncCompletedCallback( 861 SyncStatusCallback RemoteToLocalSyncer::SyncCompletedCallback(
865 std::unique_ptr<SyncTaskToken> token) { 862 std::unique_ptr<SyncTaskToken> token) {
866 return base::Bind(&RemoteToLocalSyncer::SyncCompleted, 863 return base::Bind(&RemoteToLocalSyncer::SyncCompleted,
867 weak_ptr_factory_.GetWeakPtr(), 864 weak_ptr_factory_.GetWeakPtr(),
868 base::Passed(&token)); 865 base::Passed(&token));
869 } 866 }
870 867
871 } // namespace drive_backend 868 } // namespace drive_backend
872 } // namespace sync_file_system 869 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698