OLD | NEW |
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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 344 |
345 void ChromePasswordManagerClient::NotifyStorePasswordCalled() { | 345 void ChromePasswordManagerClient::NotifyStorePasswordCalled() { |
346 // If a site stores a credential the autofill password manager shouldn't kick | 346 // If a site stores a credential the autofill password manager shouldn't kick |
347 // in. | 347 // in. |
348 password_manager_.DropFormManagers(); | 348 password_manager_.DropFormManagers(); |
349 } | 349 } |
350 | 350 |
351 void ChromePasswordManagerClient::AutomaticPasswordSave( | 351 void ChromePasswordManagerClient::AutomaticPasswordSave( |
352 std::unique_ptr<password_manager::PasswordFormManager> saved_form) { | 352 std::unique_ptr<password_manager::PasswordFormManager> saved_form) { |
353 #if BUILDFLAG(ANDROID_JAVA_UI) | 353 #if BUILDFLAG(ANDROID_JAVA_UI) |
354 GeneratedPasswordSavedInfoBarDelegateAndroid::Create(web_contents()); | 354 GeneratedPasswordSavedInfoBarDelegateAndroid::Create(); |
355 #else | 355 #else |
356 PasswordsClientUIDelegate* manage_passwords_ui_controller = | 356 PasswordsClientUIDelegate* manage_passwords_ui_controller = |
357 PasswordsClientUIDelegateFromWebContents(web_contents()); | 357 PasswordsClientUIDelegateFromWebContents(web_contents()); |
358 manage_passwords_ui_controller->OnAutomaticPasswordSave( | 358 manage_passwords_ui_controller->OnAutomaticPasswordSave( |
359 std::move(saved_form)); | 359 std::move(saved_form)); |
360 #endif | 360 #endif |
361 } | 361 } |
362 | 362 |
363 void ChromePasswordManagerClient::PasswordWasAutofilled( | 363 void ChromePasswordManagerClient::PasswordWasAutofilled( |
364 const std::map<base::string16, const autofill::PasswordForm*>& best_matches, | 364 const std::map<base::string16, const autofill::PasswordForm*>& best_matches, |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 ChromePasswordManagerClient::FromWebContents(web_contents); | 613 ChromePasswordManagerClient::FromWebContents(web_contents); |
614 | 614 |
615 // Try to bind to the driver, but if driver is not available for this render | 615 // Try to bind to the driver, but if driver is not available for this render |
616 // frame host, the request will be just dropped. This will cause the message | 616 // frame host, the request will be just dropped. This will cause the message |
617 // pipe to be closed, which will raise a connection error on the peer side. | 617 // pipe to be closed, which will raise a connection error on the peer side. |
618 if (!instance) | 618 if (!instance) |
619 return; | 619 return; |
620 | 620 |
621 instance->credential_manager_impl_.BindRequest(std::move(request)); | 621 instance->credential_manager_impl_.BindRequest(std::move(request)); |
622 } | 622 } |
OLD | NEW |