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

Unified Diff: components/password_manager/core/browser/password_form_manager.h

Issue 866983003: GetLoginsRequest: Use ScopedVector to express ownership of forms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@324291_scopedvector
Patch Set: Second fix of the rebase Created 5 years, 10 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/password_manager/core/browser/password_form_manager.h
diff --git a/components/password_manager/core/browser/password_form_manager.h b/components/password_manager/core/browser/password_form_manager.h
index efda7d3cf91490ceb1242a884e301d2c7b13310e..ddd113a2f272d53c8b674247fa9b35c8cb85baaa 100644
--- a/components/password_manager/core/browser/password_form_manager.h
+++ b/components/password_manager/core/browser/password_form_manager.h
@@ -123,7 +123,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
void ProcessFrame(const base::WeakPtr<PasswordManagerDriver>& driver);
void OnGetPasswordStoreResults(
- const std::vector<autofill::PasswordForm*>& results) override;
+ ScopedVector<autofill::PasswordForm> results) override;
// A user opted to 'never remember' passwords for this form.
// Blacklist it so that from now on when it is seen we ignore it.
@@ -225,7 +225,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
// Determines if we need to autofill given the results of the query.
// Takes ownership of the elements in |result|.
- void OnRequestDone(const std::vector<autofill::PasswordForm*>& result);
+ void OnRequestDone(ScopedVector<autofill::PasswordForm> result);
// Helper for OnGetPasswordStoreResults to determine whether or not
// the given result form is worth scoring.
@@ -285,6 +285,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
// Set of PasswordForms from the DB that best match the form
// being managed by this. Use a map instead of vector, because we most
// frequently require lookups by username value in IsNewLogin.
+ // TODO(vabr): Consider using ScopedPtrHashMap instead of the deleter below.
autofill::PasswordFormMap best_matches_;
// Cleans up when best_matches_ goes out of scope.

Powered by Google App Engine
This is Rietveld 408576698