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

Unified Diff: chrome/browser/sync/test/integration/performance/passwords_sync_perf_test.cc

Issue 866983003: GetLoginsRequest: Use ScopedVector to express ownership of forms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@324291_scopedvector
Patch Set: Second fix of the rebase Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/test/integration/performance/passwords_sync_perf_test.cc
diff --git a/chrome/browser/sync/test/integration/performance/passwords_sync_perf_test.cc b/chrome/browser/sync/test/integration/performance/passwords_sync_perf_test.cc
index 2ff5af78aea4fd49acc151a34ac05564aac7f5b7..4e536adcf3d5fdfe357505ca8ee04fb4dd0cb610 100644
--- a/chrome/browser/sync/test/integration/performance/passwords_sync_perf_test.cc
+++ b/chrome/browser/sync/test/integration/performance/passwords_sync_perf_test.cc
@@ -12,7 +12,6 @@
using passwords_helper::AddLogin;
using passwords_helper::CreateTestPasswordForm;
-using passwords_helper::GetLogins;
using passwords_helper::GetPasswordCount;
using passwords_helper::GetPasswordStore;
using passwords_helper::UpdateLogin;
@@ -50,12 +49,11 @@ void PasswordsSyncPerfTest::AddLogins(int profile, int num_logins) {
}
void PasswordsSyncPerfTest::UpdateLogins(int profile) {
- std::vector<autofill::PasswordForm> logins;
- GetLogins(GetPasswordStore(profile), logins);
- for (std::vector<autofill::PasswordForm>::iterator it = logins.begin();
- it != logins.end(); ++it) {
- (*it).password_value = base::ASCIIToUTF16(NextPassword());
- UpdateLogin(GetPasswordStore(profile), (*it));
+ ScopedVector<autofill::PasswordForm> logins =
+ passwords_helper::GetLogins(GetPasswordStore(profile));
+ for (autofill::PasswordForm* login : logins) {
+ login->password_value = base::ASCIIToUTF16(NextPassword());
+ UpdateLogin(GetPasswordStore(profile), *login);
}
}
« no previous file with comments | « chrome/browser/sync/test/integration/passwords_helper.cc ('k') | chrome/browser/ui/passwords/password_manager_presenter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698