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

Unified Diff: components/password_manager/core/browser/password_manager.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/password_manager.h
diff --git a/components/password_manager/core/browser/password_manager.h b/components/password_manager/core/browser/password_manager.h
index 888d5c129b31a49d16c39d4de6529cfd116675ed..dcf58955fc6dbe355cfa86e2a2e9819096f1dd70 100644
--- a/components/password_manager/core/browser/password_manager.h
+++ b/components/password_manager/core/browser/password_manager.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_H_
+#include <map>
#include <memory>
#include <string>
#include <vector>
@@ -13,6 +14,7 @@
#include "base/macros.h"
#include "base/observer_list.h"
#include "base/stl_util.h"
+#include "base/strings/string16.h"
#include "build/build_config.h"
#include "components/autofill/core/common/password_form.h"
#include "components/autofill/core/common/password_form_fill_data.h"
@@ -59,13 +61,14 @@ class PasswordManager : public LoginModel {
// Called by a PasswordFormManager when it decides a form can be autofilled
// on the page.
- void Autofill(password_manager::PasswordManagerDriver* driver,
- const autofill::PasswordForm& form_for_autofill,
- const autofill::PasswordFormMap& best_matches,
- const std::vector<std::unique_ptr<autofill::PasswordForm>>&
- federated_matches,
- const autofill::PasswordForm& preferred_match,
- bool wait_for_username) const;
+ void Autofill(
+ password_manager::PasswordManagerDriver* driver,
+ const autofill::PasswordForm& form_for_autofill,
+ const std::map<base::string16, const autofill::PasswordForm*>&
+ best_matches,
+ const std::vector<const autofill::PasswordForm*>& federated_matches,
+ const autofill::PasswordForm& preferred_match,
+ bool wait_for_username) const;
// Called by a PasswordFormManager when a page initially loads and it decides
// that a form can be autofilled on the page, but a menu of account options
@@ -77,16 +80,17 @@ class PasswordManager : public LoginModel {
void ShowInitialPasswordAccountSuggestions(
password_manager::PasswordManagerDriver* driver,
const autofill::PasswordForm& form_for_autofill,
- const autofill::PasswordFormMap& best_matches,
- const std::vector<std::unique_ptr<autofill::PasswordForm>>&
- federated_matches,
+ const std::map<base::string16, const autofill::PasswordForm*>&
+ best_matches,
const autofill::PasswordForm& preferred_match,
bool wait_for_username) const;
// Called by a PasswordFormManager when it decides a HTTP auth dialog can be
// autofilled.
- void AutofillHttpAuth(const autofill::PasswordFormMap& best_matches,
- const autofill::PasswordForm& preferred_match) const;
+ void AutofillHttpAuth(
+ const std::map<base::string16, const autofill::PasswordForm*>&
+ best_matches,
+ const autofill::PasswordForm& preferred_match) const;
// LoginModel implementation.
void AddObserverAndDeliverCredentials(

Powered by Google App Engine
This is Rietveld 408576698