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

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

Issue 1096983002: Update usages of std::map to use ScopedPtrMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@passwordmanager-scopedmemory
Patch Set: Rebase. Created 5 years, 6 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_test.cc
diff --git a/chrome/browser/ui/passwords/manage_passwords_test.cc b/chrome/browser/ui/passwords/manage_passwords_test.cc
index 5d2aa8d7b3d85971b8ea81723752a711873f0da3..00a80cce432e29c1711b6b42eb17a86a06def656 100644
--- a/chrome/browser/ui/passwords/manage_passwords_test.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_test.cc
@@ -46,7 +46,8 @@ void ManagePasswordsTest::ExecuteManagePasswordsCommand() {
void ManagePasswordsTest::SetupManagingPasswords() {
base::string16 kTestUsername = base::ASCIIToUTF16("test_username");
autofill::PasswordFormMap map;
- map[kTestUsername] = test_form();
+ map.insert(kTestUsername,
+ make_scoped_ptr(new autofill::PasswordForm(*test_form())));
GetController()->OnPasswordAutofilled(map);
}
@@ -72,7 +73,8 @@ void ManagePasswordsTest::SetupBlackistedPassword() {
test_form()->blacklisted_by_user = true;
test_form()->username_value.clear();
autofill::PasswordFormMap map;
- map[test_form()->username_value] = test_form();
+ map.insert(test_form()->username_value,
+ make_scoped_ptr(new autofill::PasswordForm(*test_form())));
GetController()->OnBlacklistBlockedAutofill(map);
}
@@ -82,7 +84,8 @@ void ManagePasswordsTest::SetupChooseCredentials(
const GURL& origin) {
base::string16 kTestUsername = base::ASCIIToUTF16("test_username");
autofill::PasswordFormMap map;
- map[kTestUsername] = test_form();
+ map.insert(kTestUsername,
+ make_scoped_ptr(new autofill::PasswordForm(*test_form())));
GetController()->OnChooseCredentials(
local_credentials.Pass(), federated_credentials.Pass(), origin,
base::Bind(&ManagePasswordsTest::OnChooseCredential, this));

Powered by Google App Engine
This is Rietveld 408576698