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

Unified Diff: chrome/browser/ui/passwords/password_manager_presenter.cc

Issue 34393007: [Win] Add option to reauthenticate the OS user before revealing passwords. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@password
Patch Set: remove GetNativeWindow from OS_ANDROID Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/passwords/password_manager_presenter.cc
diff --git a/chrome/browser/ui/passwords/password_manager_presenter.cc b/chrome/browser/ui/passwords/password_manager_presenter.cc
index 5f723d74d42f0d198bae573ece88dad36bee24da..a59134359e8929b021b7c240b93d3d22e7bcf5e6 100644
--- a/chrome/browser/ui/passwords/password_manager_presenter.cc
+++ b/chrome/browser/ui/passwords/password_manager_presenter.cc
@@ -17,6 +17,7 @@
#include "chrome/common/url_constants.h"
#include "components/autofill/core/common/password_form.h"
#include "content/public/browser/user_metrics.h"
+#include "content/public/browser/web_contents.h"
PasswordManagerPresenter::PasswordManagerPresenter(
PasswordUIView* password_view)
@@ -93,15 +94,18 @@ void PasswordManagerPresenter::RemovePasswordException(size_t index) {
}
void PasswordManagerPresenter::RequestShowPassword(size_t index) {
+#if !defined(OS_ANDROID) // This is never called on Android.
DCHECK_LT(index, password_list_.size());
if (IsAuthenticationRequired()) {
- if (password_manager_util::AuthenticateUser())
+ if (password_manager_util::AuthenticateUser(
+ password_view_->GetNativeWindow()))
last_authentication_time_ = base::TimeTicks::Now();
else
return;
}
// Call back the front end to reveal the password.
password_view_->ShowPassword(index, password_list_[index]->password_value);
+#endif
}
const autofill::PasswordForm& PasswordManagerPresenter::GetPassword(
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/ui/passwords/password_manager_presenter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698