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