| 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 driver->ForceSavePassword(); | 300 driver->ForceSavePassword(); |
| 301 } | 301 } |
| 302 | 302 |
| 303 void ChromePasswordManagerClient::GeneratePassword() { | 303 void ChromePasswordManagerClient::GeneratePassword() { |
| 304 password_manager::ContentPasswordManagerDriver* driver = | 304 password_manager::ContentPasswordManagerDriver* driver = |
| 305 driver_factory_->GetDriverForFrame(web_contents()->GetFocusedFrame()); | 305 driver_factory_->GetDriverForFrame(web_contents()->GetFocusedFrame()); |
| 306 driver->GeneratePassword(); | 306 driver->GeneratePassword(); |
| 307 } | 307 } |
| 308 | 308 |
| 309 void ChromePasswordManagerClient::NotifyUserAutoSignin( | 309 void ChromePasswordManagerClient::NotifyUserAutoSignin( |
| 310 ScopedVector<autofill::PasswordForm> local_forms) { | 310 ScopedVector<autofill::PasswordForm> local_forms, |
| 311 const GURL& origin) { |
| 311 DCHECK(!local_forms.empty()); | 312 DCHECK(!local_forms.empty()); |
| 312 #if BUILDFLAG(ANDROID_JAVA_UI) | 313 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 313 ShowAutoSigninPrompt(web_contents(), local_forms[0]->username_value); | 314 ShowAutoSigninPrompt(web_contents(), local_forms[0]->username_value); |
| 314 #else | 315 #else |
| 315 PasswordsClientUIDelegateFromWebContents(web_contents()) | 316 PasswordsClientUIDelegateFromWebContents(web_contents()) |
| 316 ->OnAutoSignin(std::move(local_forms)); | 317 ->OnAutoSignin(std::move(local_forms), origin); |
| 317 | |
| 318 #endif | 318 #endif |
| 319 } | 319 } |
| 320 | 320 |
| 321 void ChromePasswordManagerClient::NotifyUserCouldBeAutoSignedIn( | 321 void ChromePasswordManagerClient::NotifyUserCouldBeAutoSignedIn( |
| 322 scoped_ptr<autofill::PasswordForm> form) { | 322 scoped_ptr<autofill::PasswordForm> form) { |
| 323 possible_auto_sign_in_ = std::move(form); | 323 possible_auto_sign_in_ = std::move(form); |
| 324 } | 324 } |
| 325 | 325 |
| 326 void ChromePasswordManagerClient::NotifySuccessfulLoginWithExistingPassword( | 326 void ChromePasswordManagerClient::NotifySuccessfulLoginWithExistingPassword( |
| 327 const autofill::PasswordForm& form) { | 327 const autofill::PasswordForm& form) { |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 | 608 |
| 609 const password_manager::CredentialsFilter* | 609 const password_manager::CredentialsFilter* |
| 610 ChromePasswordManagerClient::GetStoreResultFilter() const { | 610 ChromePasswordManagerClient::GetStoreResultFilter() const { |
| 611 return &credentials_filter_; | 611 return &credentials_filter_; |
| 612 } | 612 } |
| 613 | 613 |
| 614 const password_manager::LogManager* ChromePasswordManagerClient::GetLogManager() | 614 const password_manager::LogManager* ChromePasswordManagerClient::GetLogManager() |
| 615 const { | 615 const { |
| 616 return log_manager_.get(); | 616 return log_manager_.get(); |
| 617 } | 617 } |
| OLD | NEW |