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

Unified Diff: chrome/browser/ui/passwords/password_manager_presenter.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: Rebased Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/passwords/password_manager_presenter.cc
diff --git a/chrome/browser/ui/passwords/password_manager_presenter.cc b/chrome/browser/ui/passwords/password_manager_presenter.cc
index 1e7c1d041e4629e35e0c473e2cbe9133e6865f47..7cee7f1169443f6dd6bc1a2af8e0e0c8cb3edc59 100644
--- a/chrome/browser/ui/passwords/password_manager_presenter.cc
+++ b/chrome/browser/ui/passwords/password_manager_presenter.cc
@@ -211,11 +211,9 @@ void PasswordManagerPresenter::PasswordListPopulater::Populate() {
}
}
-void PasswordManagerPresenter::PasswordListPopulater::OnGetPasswordStoreResults(
- const std::vector<autofill::PasswordForm*>& results) {
- page_->password_list_.clear();
- page_->password_list_.insert(page_->password_list_.end(),
- results.begin(), results.end());
+void PasswordManagerPresenter::PasswordListPopulater::
+ OnGetPasswordStoreResults() {
+ page_->password_list_.swap(*results());
page_->SetPasswordList();
}
@@ -235,10 +233,7 @@ void PasswordManagerPresenter::PasswordExceptionListPopulater::Populate() {
}
void PasswordManagerPresenter::PasswordExceptionListPopulater::
- OnGetPasswordStoreResults(
- const std::vector<autofill::PasswordForm*>& results) {
- page_->password_exception_list_.clear();
- page_->password_exception_list_.insert(page_->password_exception_list_.end(),
- results.begin(), results.end());
+ OnGetPasswordStoreResults() {
+ page_->password_exception_list_.swap(*results());
page_->SetPasswordExceptionList();
}

Powered by Google App Engine
This is Rietveld 408576698