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

Unified Diff: components/autofill/core/common/password_form.h

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: components/autofill/core/common/password_form.h
diff --git a/components/autofill/core/common/password_form.h b/components/autofill/core/common/password_form.h
index 5c7bee5db561a034d0a6d768881804f9c622e5ef..189f929ef972f29420ac43729486efed4aed04bc 100644
--- a/components/autofill/core/common/password_form.h
+++ b/components/autofill/core/common/password_form.h
@@ -9,6 +9,8 @@
#include <string>
#include <vector>
+#include "base/containers/scoped_ptr_map.h"
+#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "components/autofill/core/common/form_data.h"
#include "url/gurl.h"
@@ -280,8 +282,10 @@ struct PasswordForm {
};
// Map username to PasswordForm* for convenience. See password_form_manager.h.
-typedef std::map<base::string16, PasswordForm*> PasswordFormMap;
+typedef base::ScopedPtrMap<base::string16, scoped_ptr<PasswordForm>>
+ PasswordFormMap;
+// Like PasswordFormMap, but with weak (not owned) pointers.
typedef std::map<base::string16, const PasswordForm*> ConstPasswordFormMap;
// For testing.
« no previous file with comments | « chromeos/dbus/shill_profile_client.cc ('k') | components/autofill/core/common/password_form_fill_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698