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

Side by Side Diff: chrome/browser/ui/webui/options/password_manager_handler.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 spurious logging code. Add clock skew factor. Created 7 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/webui/options/password_manager_handler.h" 5 #include "chrome/browser/ui/webui/options/password_manager_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 157
158 void PasswordManagerHandler::RequestShowPassword(const ListValue* args) { 158 void PasswordManagerHandler::RequestShowPassword(const ListValue* args) {
159 int index; 159 int index;
160 if (!ExtractIntegerValue(args, &index)) { 160 if (!ExtractIntegerValue(args, &index)) {
161 NOTREACHED(); 161 NOTREACHED();
162 return; 162 return;
163 } 163 }
164 164
165 if (IsAuthenticationRequired()) { 165 if (IsAuthenticationRequired()) {
166 if (password_manager_util::AuthenticateUser()) 166 if (password_manager_util::AuthenticateUser(web_ui()->GetWebContents()))
167 last_authentication_time_ = base::TimeTicks::Now(); 167 last_authentication_time_ = base::TimeTicks::Now();
168 else 168 else
169 return; 169 return;
170 } 170 }
171 171
172 // Call back the front end to reveal the password. 172 // Call back the front end to reveal the password.
173 web_ui()->CallJavascriptFunction( 173 web_ui()->CallJavascriptFunction(
174 "PasswordManager.showPassword", 174 "PasswordManager.showPassword",
175 base::FundamentalValue(index), 175 base::FundamentalValue(index),
176 StringValue(password_list_[index]->password_value)); 176 StringValue(password_list_[index]->password_value));
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 void PasswordManagerHandler::PasswordExceptionListPopulater:: 299 void PasswordManagerHandler::PasswordExceptionListPopulater::
300 OnGetPasswordStoreResults( 300 OnGetPasswordStoreResults(
301 const std::vector<autofill::PasswordForm*>& results) { 301 const std::vector<autofill::PasswordForm*>& results) {
302 // TODO(kaiwang): Implement when I refactor 302 // TODO(kaiwang): Implement when I refactor
303 // PasswordStore::GetAutofillableLogins and PasswordStore::GetBlacklistLogins. 303 // PasswordStore::GetAutofillableLogins and PasswordStore::GetBlacklistLogins.
304 NOTIMPLEMENTED(); 304 NOTIMPLEMENTED();
305 } 305 }
306 306
307 } // namespace options 307 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698