Index: chrome/browser/sync_file_system/drive_backend/list_changes_task.cc |
diff --git a/chrome/browser/sync_file_system/drive_backend/list_changes_task.cc b/chrome/browser/sync_file_system/drive_backend/list_changes_task.cc |
index 7d8d79367413a005e66ac2a3ddea2915c484bb16..9991ff3cfda63aebeafc4a17afc2c7edef9fb2e5 100644 |
--- a/chrome/browser/sync_file_system/drive_backend/list_changes_task.cc |
+++ b/chrome/browser/sync_file_system/drive_backend/list_changes_task.cc |
@@ -75,12 +75,12 @@ void ListChangesTask::DidListChanges( |
return; |
} |
- std::vector<google_apis::ChangeResource*> changes; |
- change_list->mutable_items()->release(&changes); |
- |
- change_list_.reserve(change_list_.size() + changes.size()); |
- for (size_t i = 0; i < changes.size(); ++i) |
- change_list_.push_back(changes[i]); |
+ change_list_.reserve(change_list_.size() + |
+ change_list->mutable_items()->size()); |
+ std::move(change_list->mutable_items()->begin(), |
+ change_list->mutable_items()->end(), |
+ std::back_inserter(change_list_)); |
+ change_list->mutable_items()->clear(); |
Avi (use Gerrit)
2017/01/09 17:18:29
And a move + back_inserter again...
leonhsl(Using Gerrit)
2017/01/10 04:39:36
:)
|
if (!change_list->next_link().is_empty()) { |
drive_service()->GetRemainingChangeList( |