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

Unified Diff: components/password_manager/core/browser/form_saver.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.h
diff --git a/components/password_manager/core/browser/form_saver.h b/components/password_manager/core/browser/form_saver.h
index 27916b10498bfe9539cc11c46628ff36be35806c..5c82c374e235428ae5f334173fc1a39d5e905691 100644
--- a/components/password_manager/core/browser/form_saver.h
+++ b/components/password_manager/core/browser/form_saver.h
@@ -5,10 +5,13 @@
#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_FORM_SAVER_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_FORM_SAVER_H_
+#include <map>
+#include <memory>
#include <vector>
#include "base/macros.h"
#include "base/optional.h"
+#include "base/strings/string16.h"
#include "components/autofill/core/common/password_form.h"
namespace password_manager {
@@ -28,7 +31,8 @@ class FormSaver {
// |best_matches|. If |old_primary_key| is given, uses it for saving
// |pending|.
virtual 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) = 0;
// Updates the |pending| form and updates the stored preference on
@@ -37,7 +41,8 @@ class FormSaver {
// |credentials_to_update|.
virtual 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) = 0;
@@ -61,7 +66,7 @@ class FormSaver {
// account.
virtual void WipeOutdatedCopies(
const autofill::PasswordForm& pending,
- autofill::PasswordFormMap* best_matches,
+ std::map<base::string16, const autofill::PasswordForm*>* best_matches,
const autofill::PasswordForm** preferred_match) = 0;
private:

Powered by Google App Engine
This is Rietveld 408576698