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

Unified Diff: ios/chrome/browser/passwords/ios_chrome_update_password_infobar_delegate.mm

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: ios/chrome/browser/passwords/ios_chrome_update_password_infobar_delegate.mm
diff --git a/ios/chrome/browser/passwords/ios_chrome_update_password_infobar_delegate.mm b/ios/chrome/browser/passwords/ios_chrome_update_password_infobar_delegate.mm
index 4549b3e8f4c8f020d445adc2d2aa7efab341169b..7bd25cc82658cdb122d66a7178b18ee21631b50f 100644
--- a/ios/chrome/browser/passwords/ios_chrome_update_password_infobar_delegate.mm
+++ b/ios/chrome/browser/passwords/ios_chrome_update_password_infobar_delegate.mm
@@ -57,8 +57,7 @@ bool IOSChromeUpdatePasswordInfoBarDelegate::ShowMultipleAccounts() const {
NSArray* IOSChromeUpdatePasswordInfoBarDelegate::GetAccounts() const {
NSMutableArray* usernames = [NSMutableArray array];
- const autofill::PasswordFormMap& matches = form_to_save()->best_matches();
- for (const auto& match : matches) {
+ for (const auto& match : form_to_save()->best_matches()) {
[usernames addObject:base::SysUTF16ToNSString(match.first)];
}
return usernames;
@@ -96,7 +95,7 @@ bool IOSChromeUpdatePasswordInfoBarDelegate::Accept() {
DCHECK(form_to_save());
if (ShowMultipleAccounts()) {
form_to_save()->Update(
- *form_to_save()->best_matches().at(selected_account_).get());
+ *form_to_save()->best_matches().at(selected_account_));
} else {
form_to_save()->Update(form_to_save()->pending_credentials());
}

Powered by Google App Engine
This is Rietveld 408576698