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

Unified Diff: chrome/browser/ui/passwords/manage_passwords_ui_controller.cc

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: chrome/browser/ui/passwords/manage_passwords_ui_controller.cc
diff --git a/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc b/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc
index 3d1301a124d4ebd21eb2d86723c1d43f3b2ea656..f3bbc983632565daf37d5b8ef3803084329788f1 100644
--- a/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc
@@ -32,7 +32,6 @@
#include "content/public/browser/navigation_details.h"
#include "ui/base/l10n/l10n_util.h"
-using autofill::PasswordFormMap;
using password_manager::PasswordFormManager;
namespace {
@@ -77,7 +76,8 @@ void ManagePasswordsUIController::OnPasswordSubmitted(
DestroyAccountChooser();
passwords_data_.OnPendingPassword(std::move(form_manager));
if (show_bubble) {
- password_manager::InteractionsStats* stats = GetCurrentInteractionStats();
+ const password_manager::InteractionsStats* stats =
+ GetCurrentInteractionStats();
const int show_threshold =
password_bubble_experiment::GetSmartBubbleDismissalThreshold();
if (stats && show_threshold > 0 && stats->dismissal_count >= show_threshold)
@@ -149,10 +149,10 @@ void ManagePasswordsUIController::OnAutomaticPasswordSave(
}
void ManagePasswordsUIController::OnPasswordAutofilled(
- const autofill::PasswordFormMap& password_form_map,
+ const std::map<base::string16, const autofill::PasswordForm*>&
+ password_form_map,
const GURL& origin,
- const std::vector<std::unique_ptr<autofill::PasswordForm>>*
- federated_matches) {
+ const std::vector<const autofill::PasswordForm*>* federated_matches) {
// To change to managed state only when the managed state is more important
// for the user that the current state.
if (passwords_data_.state() == password_manager::ui::INACTIVE_STATE ||
@@ -241,7 +241,7 @@ ManagePasswordsUIController::GetFederatedForms() const {
return passwords_data_.federation_providers_forms();
}
-password_manager::InteractionsStats*
+const password_manager::InteractionsStats*
ManagePasswordsUIController::GetCurrentInteractionStats() const {
DCHECK_EQ(password_manager::ui::PENDING_PASSWORD_STATE, GetState());
password_manager::PasswordFormManager* form_manager =

Powered by Google App Engine
This is Rietveld 408576698