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

Side by Side Diff: chrome/browser/password_manager/chrome_password_manager_client.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/password_manager/chrome_password_manager_client.h" 5 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 GeneratedPasswordSavedInfoBarDelegateAndroid::Create(web_contents()); 346 GeneratedPasswordSavedInfoBarDelegateAndroid::Create(web_contents());
347 #else 347 #else
348 PasswordsClientUIDelegate* manage_passwords_ui_controller = 348 PasswordsClientUIDelegate* manage_passwords_ui_controller =
349 PasswordsClientUIDelegateFromWebContents(web_contents()); 349 PasswordsClientUIDelegateFromWebContents(web_contents());
350 manage_passwords_ui_controller->OnAutomaticPasswordSave( 350 manage_passwords_ui_controller->OnAutomaticPasswordSave(
351 std::move(saved_form)); 351 std::move(saved_form));
352 #endif 352 #endif
353 } 353 }
354 354
355 void ChromePasswordManagerClient::PasswordWasAutofilled( 355 void ChromePasswordManagerClient::PasswordWasAutofilled(
356 const autofill::PasswordFormMap& best_matches, 356 const std::map<base::string16, const autofill::PasswordForm*>& best_matches,
357 const GURL& origin, 357 const GURL& origin,
358 const std::vector<std::unique_ptr<autofill::PasswordForm>>* 358 const std::vector<const autofill::PasswordForm*>* federated_matches) const {
359 federated_matches) const {
360 #if !BUILDFLAG(ANDROID_JAVA_UI) 359 #if !BUILDFLAG(ANDROID_JAVA_UI)
361 PasswordsClientUIDelegate* manage_passwords_ui_controller = 360 PasswordsClientUIDelegate* manage_passwords_ui_controller =
362 PasswordsClientUIDelegateFromWebContents(web_contents()); 361 PasswordsClientUIDelegateFromWebContents(web_contents());
363 manage_passwords_ui_controller->OnPasswordAutofilled(best_matches, origin, 362 manage_passwords_ui_controller->OnPasswordAutofilled(best_matches, origin,
364 federated_matches); 363 federated_matches);
365 #endif 364 #endif
366 } 365 }
367 366
368 void ChromePasswordManagerClient::HidePasswordGenerationPopup() { 367 void ChromePasswordManagerClient::HidePasswordGenerationPopup() {
369 if (popup_controller_) 368 if (popup_controller_)
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 password_manager::mojom::CredentialManagerRequest request) { 593 password_manager::mojom::CredentialManagerRequest request) {
595 content::WebContents* web_contents = 594 content::WebContents* web_contents =
596 content::WebContents::FromRenderFrameHost(render_frame_host); 595 content::WebContents::FromRenderFrameHost(render_frame_host);
597 DCHECK(web_contents); 596 DCHECK(web_contents);
598 597
599 ChromePasswordManagerClient* instance = 598 ChromePasswordManagerClient* instance =
600 ChromePasswordManagerClient::FromWebContents(web_contents); 599 ChromePasswordManagerClient::FromWebContents(web_contents);
601 DCHECK(instance); 600 DCHECK(instance);
602 instance->credential_manager_impl_.BindRequest(std::move(request)); 601 instance->credential_manager_impl_.BindRequest(std::move(request));
603 } 602 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698