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

Unified Diff: chrome/browser/ui/passwords/manage_passwords_bubble_model_unittest.cc

Issue 2253233005: Change ScopedVector to vector<unique_ptr> in the password's UI code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android+ Created 4 years, 4 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/manage_passwords_bubble_model_unittest.cc
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model_unittest.cc b/chrome/browser/ui/passwords/manage_passwords_bubble_model_unittest.cc
index cfbeb729b5cef76c2bbbc0331a666eae5f97997a..c8280de3a3c0f865f1f85d8a88336095611f5b78 100644
--- a/chrome/browser/ui/passwords/manage_passwords_bubble_model_unittest.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model_unittest.cc
@@ -172,8 +172,6 @@ void ManagePasswordsBubbleModelTest::SetUpWithState(
void ManagePasswordsBubbleModelTest::PretendPasswordWaiting() {
autofill::PasswordForm form = GetPendingPassword();
EXPECT_CALL(*controller(), GetPendingPassword()).WillOnce(ReturnRef(form));
- std::vector<const autofill::PasswordForm*> forms;
- EXPECT_CALL(*controller(), GetCurrentForms()).WillOnce(ReturnRef(forms));
password_manager::InteractionsStats stats = GetTestStats();
EXPECT_CALL(*controller(), GetCurrentInteractionStats())
.WillOnce(Return(&stats));
@@ -184,7 +182,7 @@ void ManagePasswordsBubbleModelTest::PretendPasswordWaiting() {
void ManagePasswordsBubbleModelTest::PretendUpdatePasswordWaiting() {
autofill::PasswordForm form = GetPendingPassword();
EXPECT_CALL(*controller(), GetPendingPassword()).WillOnce(ReturnRef(form));
- std::vector<const autofill::PasswordForm*> forms;
+ std::vector<std::unique_ptr<autofill::PasswordForm>> forms;
EXPECT_CALL(*controller(), GetCurrentForms()).WillOnce(ReturnRef(forms));
EXPECT_CALL(*controller(), IsPasswordOverridden()).WillOnce(Return(false));
SetUpWithState(password_manager::ui::PENDING_PASSWORD_UPDATE_STATE,
@@ -199,8 +197,8 @@ void ManagePasswordsBubbleModelTest::PretendAutoSigningIn() {
}
void ManagePasswordsBubbleModelTest::PretendManagingPasswords() {
- autofill::PasswordForm form = GetPendingPassword();
- std::vector<const autofill::PasswordForm*> forms(1, &form);
+ std::vector<std::unique_ptr<autofill::PasswordForm>> forms(1);
+ forms[0].reset(new autofill::PasswordForm(GetPendingPassword()));
EXPECT_CALL(*controller(), GetCurrentForms()).WillOnce(ReturnRef(forms));
SetUpWithState(password_manager::ui::MANAGE_STATE,
ManagePasswordsBubbleModel::USER_ACTION);
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_bubble_model.cc ('k') | chrome/browser/ui/passwords/manage_passwords_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698