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

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

Issue 2262843002: Make PasswordFormManager::best_matches_ const (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@621355_pass_creds_to_update_by_value
Patch Set: Just rebased Created 4 years, 4 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/form_saver_impl.h
diff --git a/components/password_manager/core/browser/form_saver_impl.h b/components/password_manager/core/browser/form_saver_impl.h
index 6aa9f1ba8e1d87d28bc31e928a3236a27bce161b..c881c4f219c9e116fdf3bf4359a1db33633dbd1d 100644
--- a/components/password_manager/core/browser/form_saver_impl.h
+++ b/components/password_manager/core/browser/form_saver_impl.h
@@ -26,10 +26,12 @@ class FormSaverImpl : public FormSaver {
// FormSaver:
void PermanentlyBlacklist(autofill::PasswordForm* observed) override;
void Save(const autofill::PasswordForm& pending,
- const autofill::PasswordFormMap& best_matches,
+ const std::map<base::string16, const autofill::PasswordForm*>&
+ best_matches,
const autofill::PasswordForm* old_primary_key) override;
void Update(const autofill::PasswordForm& pending,
- const autofill::PasswordFormMap& best_matches,
+ const std::map<base::string16, const autofill::PasswordForm*>&
+ best_matches,
const std::vector<autofill::PasswordForm>* credentials_to_update,
const autofill::PasswordForm* old_primary_key) override;
void PresaveGeneratedPassword(
@@ -37,7 +39,7 @@ class FormSaverImpl : public FormSaver {
void RemovePresavedPassword() override;
void WipeOutdatedCopies(
const autofill::PasswordForm& pending,
- autofill::PasswordFormMap* best_matches,
+ std::map<base::string16, const autofill::PasswordForm*>* best_matches,
const autofill::PasswordForm** preferred_match) override;
private:
@@ -46,7 +48,8 @@ class FormSaverImpl : public FormSaver {
void SaveImpl(
const autofill::PasswordForm& pending,
bool is_new_login,
- const autofill::PasswordFormMap& best_matches,
+ const std::map<base::string16, const autofill::PasswordForm*>&
+ best_matches,
const std::vector<autofill::PasswordForm>* credentials_to_update,
const autofill::PasswordForm* old_primary_key);
@@ -63,7 +66,8 @@ class FormSaverImpl : public FormSaver {
PasswordStore* const store_;
// Caches the best matches during a call to Save() or Update().
- const autofill::PasswordFormMap* best_matches_ = nullptr;
+ const std::map<base::string16, const autofill::PasswordForm*>* best_matches_ =
+ nullptr;
// Caches the pending credential during a call to Save() or Update().
const autofill::PasswordForm* pending_ = nullptr;

Powered by Google App Engine
This is Rietveld 408576698