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

Side by Side Diff: chrome/browser/android/history_report/data_provider.cc

Issue 1551033002: Convert Pass()→std::move() in //chrome (Android edition) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enable RVO by making types match Created 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/android/history_report/data_provider.h" 5 #include "chrome/browser/android/history_report/data_provider.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 145
146 valid_entries.reset(new std::vector<DeltaFileEntryWithData>()); 146 valid_entries.reset(new std::vector<DeltaFileEntryWithData>());
147 valid_entries->reserve(entries->size()); 147 valid_entries->reserve(entries->size());
148 for (size_t i = 0; i < entries->size(); ++i) { 148 for (size_t i = 0; i < entries->size(); ++i) {
149 const DeltaFileEntryWithData& entry = (*entries)[i]; 149 const DeltaFileEntryWithData& entry = (*entries)[i];
150 if (entry.Valid()) valid_entries->push_back(entry); 150 if (entry.Valid()) valid_entries->push_back(entry);
151 if (entry.SeqNo() > last_seq_no) last_seq_no = entry.SeqNo(); 151 if (entry.SeqNo() > last_seq_no) last_seq_no = entry.SeqNo();
152 } 152 }
153 } while (!entries->empty() && valid_entries->empty()); 153 } while (!entries->empty() && valid_entries->empty());
154 return valid_entries.Pass(); 154 return valid_entries;
155 } 155 }
156 156
157 void DataProvider::StartVisitMigrationToUsageBuffer( 157 void DataProvider::StartVisitMigrationToUsageBuffer(
158 UsageReportsBufferService* buffer_service) { 158 UsageReportsBufferService* buffer_service) {
159 base::WaitableEvent finished(false, false); 159 base::WaitableEvent finished(false, false);
160 buffer_service->Clear(); 160 buffer_service->Clear();
161 content::BrowserThread::PostTask( 161 content::BrowserThread::PostTask(
162 content::BrowserThread::UI, 162 content::BrowserThread::UI,
163 FROM_HERE, 163 FROM_HERE,
164 base::Bind(&StartVisitMigrationToUsageBufferUiThread, 164 base::Bind(&StartVisitMigrationToUsageBufferUiThread,
(...skipping 24 matching lines...) Expand all
189 bookmark_model_->BlockTillLoaded(); 189 bookmark_model_->BlockTillLoaded();
190 bookmark_model_->GetBookmarks(&bookmarks); 190 bookmark_model_->GetBookmarks(&bookmarks);
191 urls.reserve(urls.size() + bookmarks.size()); 191 urls.reserve(urls.size() + bookmarks.size());
192 for (size_t i = 0; i < bookmarks.size(); i++) { 192 for (size_t i = 0; i < bookmarks.size(); i++) {
193 urls.push_back(bookmarks[i].url.spec()); 193 urls.push_back(bookmarks[i].url.spec());
194 } 194 }
195 delta_file_service_->Recreate(urls); 195 delta_file_service_->Recreate(urls);
196 } 196 }
197 197
198 } // namespace history_report 198 } // namespace history_report
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698