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

Unified Diff: chrome/browser/ui/cocoa/passwords/base_passwords_controller_test.mm

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: Mac 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/cocoa/passwords/base_passwords_controller_test.mm
diff --git a/chrome/browser/ui/cocoa/passwords/base_passwords_controller_test.mm b/chrome/browser/ui/cocoa/passwords/base_passwords_controller_test.mm
index 582f508e9ddcdca2cf7c86ec256b038d57fda61f..d805b835931b10f79aa6687c8eb11daa1a3929ab 100644
--- a/chrome/browser/ui/cocoa/passwords/base_passwords_controller_test.mm
+++ b/chrome/browser/ui/cocoa/passwords/base_passwords_controller_test.mm
@@ -57,7 +57,7 @@ void ManagePasswordsControllerTest::SetUpSavePendingState(bool empty_username) {
form.username_value = base::ASCIIToUTF16("username");
}
EXPECT_CALL(*ui_controller_, GetPendingPassword()).WillOnce(ReturnRef(form));
- std::vector<const autofill::PasswordForm*> forms;
+ std::vector<std::unique_ptr<autofill::PasswordForm>> forms;
EXPECT_CALL(*ui_controller_, GetCurrentForms()).WillOnce(ReturnRef(forms));
GURL origin(kSiteOrigin);
EXPECT_CALL(*ui_controller_, GetOrigin()).WillOnce(ReturnRef(origin));
@@ -71,10 +71,10 @@ void ManagePasswordsControllerTest::SetUpUpdatePendingState(
bool multiple_forms) {
autofill::PasswordForm form;
EXPECT_CALL(*ui_controller_, GetPendingPassword()).WillOnce(ReturnRef(form));
- std::vector<const autofill::PasswordForm*> forms;
- forms.push_back(&form);
+ std::vector<std::unique_ptr<autofill::PasswordForm>> forms;
+ forms.push_back(base::WrapUnique(new autofill::PasswordForm(form)));
vabr (Chromium) 2016/08/18 18:39:19 nit: Please use base::MakeUnique<autofill::Passwor
vasilii 2016/08/19 09:52:30 Done.
if (multiple_forms) {
- forms.push_back(&form);
+ forms.push_back(base::WrapUnique(new autofill::PasswordForm(form)));
}
EXPECT_CALL(*ui_controller_, GetCurrentForms()).WillOnce(ReturnRef(forms));
GURL origin(kSiteOrigin);

Powered by Google App Engine
This is Rietveld 408576698