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

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

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/cocoa/passwords/manage_passwords_bubble_manage_view_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller_unittest.mm b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller_unittest.mm
index c90e11c1009b142704eda9b1be8ec0ccd78eb839..757ca2cd4f0b93953d5c6de8be4630203476261b 100644
--- a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller_unittest.mm
@@ -5,6 +5,7 @@
#import "chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller.h"
#include "base/mac/foundation_util.h"
+#include "base/memory/scoped_ptr.h"
#include "base/strings/utf_string_conversions.h"
#import "chrome/browser/ui/cocoa/passwords/manage_password_item_view_controller.h"
#include "chrome/browser/ui/cocoa/passwords/manage_passwords_controller_test.h"
@@ -86,15 +87,15 @@ TEST_F(ManagePasswordsBubbleManageViewControllerTest,
ShouldShowAllPasswordItemsWhenPasswordsExistForSite) {
// Add a few password entries.
autofill::PasswordFormMap map;
- autofill::PasswordForm form1;
- form1.username_value = base::ASCIIToUTF16("username1");
- form1.password_value = base::ASCIIToUTF16("password1");
- map[base::ASCIIToUTF16("username1")] = &form1;
-
- autofill::PasswordForm form2;
- form2.username_value = base::ASCIIToUTF16("username2");
- form2.password_value = base::ASCIIToUTF16("password2");
- map[base::ASCIIToUTF16("username2")] = &form2;
+ scoped_ptr<autofill::PasswordForm> form1(new autofill::PasswordForm);
+ form1->username_value = base::ASCIIToUTF16("username1");
+ form1->password_value = base::ASCIIToUTF16("password1");
+ map.insert(base::ASCIIToUTF16("username1"), form1.Pass());
+
+ scoped_ptr<autofill::PasswordForm> form2(new autofill::PasswordForm);
+ form2->username_value = base::ASCIIToUTF16("username2");
+ form2->password_value = base::ASCIIToUTF16("password2");
+ map.insert(base::ASCIIToUTF16("username2"), form2.Pass());
// Add the entries to the model.
ui_controller()->OnPasswordAutofilled(map);

Powered by Google App Engine
This is Rietveld 408576698