Chromium Code Reviews| 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 370 manage_passwords_ui_controller->OnPasswordAutofilled(best_matches, origin, | 370 manage_passwords_ui_controller->OnPasswordAutofilled(best_matches, origin, |
| 371 federated_matches); | 371 federated_matches); |
| 372 #endif | 372 #endif |
| 373 } | 373 } |
| 374 | 374 |
| 375 void ChromePasswordManagerClient::HidePasswordGenerationPopup() { | 375 void ChromePasswordManagerClient::HidePasswordGenerationPopup() { |
| 376 if (popup_controller_) | 376 if (popup_controller_) |
| 377 popup_controller_->HideAndDestroy(); | 377 popup_controller_->HideAndDestroy(); |
| 378 } | 378 } |
| 379 | 379 |
| 380 void ChromePasswordManagerClient::CheckReuse( | |
| 381 const base::string16& input, | |
| 382 const std::string& domain, | |
| 383 password_manager::PasswordReuseDetectorConsumer* consumer) { | |
| 384 GetPasswordStore()->CheckReuse(input, domain, consumer); | |
|
vabr (Chromium)
2016/12/20 18:11:44
What is the advantage of having PasswordManagerCli
dvadym
2016/12/21 12:15:35
Mainly for easier testing. In the next CL I'm goin
| |
| 385 } | |
| 386 | |
| 380 PrefService* ChromePasswordManagerClient::GetPrefs() { | 387 PrefService* ChromePasswordManagerClient::GetPrefs() { |
| 381 return profile_->GetPrefs(); | 388 return profile_->GetPrefs(); |
| 382 } | 389 } |
| 383 | 390 |
| 384 password_manager::PasswordStore* | 391 password_manager::PasswordStore* |
| 385 ChromePasswordManagerClient::GetPasswordStore() const { | 392 ChromePasswordManagerClient::GetPasswordStore() const { |
| 386 // Always use EXPLICIT_ACCESS as the password manager checks IsOffTheRecord | 393 // Always use EXPLICIT_ACCESS as the password manager checks IsOffTheRecord |
| 387 // itself when it shouldn't access the PasswordStore. | 394 // itself when it shouldn't access the PasswordStore. |
| 388 // TODO(gcasto): Is is safe to change this to | 395 // TODO(gcasto): Is is safe to change this to |
| 389 // ServiceAccessType::IMPLICIT_ACCESS? | 396 // ServiceAccessType::IMPLICIT_ACCESS? |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 613 ChromePasswordManagerClient::FromWebContents(web_contents); | 620 ChromePasswordManagerClient::FromWebContents(web_contents); |
| 614 | 621 |
| 615 // Try to bind to the driver, but if driver is not available for this render | 622 // 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 | 623 // 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. | 624 // pipe to be closed, which will raise a connection error on the peer side. |
| 618 if (!instance) | 625 if (!instance) |
| 619 return; | 626 return; |
| 620 | 627 |
| 621 instance->credential_manager_impl_.BindRequest(std::move(request)); | 628 instance->credential_manager_impl_.BindRequest(std::move(request)); |
| 622 } | 629 } |
| OLD | NEW |