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 96633264b01e32a407cdf3e9d150ee763faad6f0..f246e73f7ad833dbc5ac2c68263a68e8caee5a84 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,9 @@ struct PasswordForm { |
}; |
// Map username to PasswordForm* for convenience. See password_form_manager.h. |
-typedef std::map<base::string16, PasswordForm*> PasswordFormMap; |
+typedef 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. |