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

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: fix nits. fix error checking on NetUserGetInfo 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 16 matching lines...) Expand all
27 27
28 PasswordManagerHandler::PasswordManagerHandler() 28 PasswordManagerHandler::PasswordManagerHandler()
29 : password_manager_presenter_(this) {} 29 : password_manager_presenter_(this) {}
30 30
31 PasswordManagerHandler::~PasswordManagerHandler() {} 31 PasswordManagerHandler::~PasswordManagerHandler() {}
32 32
33 Profile* PasswordManagerHandler::GetProfile() { 33 Profile* PasswordManagerHandler::GetProfile() {
34 return Profile::FromWebUI(web_ui()); 34 return Profile::FromWebUI(web_ui());
35 } 35 }
36 36
37 content::WebContents* PasswordManagerHandler::GetWebContents() {
38 return web_ui()->GetWebContents();
39 }
40
37 void PasswordManagerHandler::GetLocalizedValues( 41 void PasswordManagerHandler::GetLocalizedValues(
38 DictionaryValue* localized_strings) { 42 DictionaryValue* localized_strings) {
39 DCHECK(localized_strings); 43 DCHECK(localized_strings);
40 44
41 static const OptionsStringResource resources[] = { 45 static const OptionsStringResource resources[] = {
42 { "savedPasswordsTitle", 46 { "savedPasswordsTitle",
43 IDS_PASSWORDS_SHOW_PASSWORDS_TAB_TITLE }, 47 IDS_PASSWORDS_SHOW_PASSWORDS_TAB_TITLE },
44 { "passwordExceptionsTitle", 48 { "passwordExceptionsTitle",
45 IDS_PASSWORDS_EXCEPTIONS_TAB_TITLE }, 49 IDS_PASSWORDS_EXCEPTIONS_TAB_TITLE },
46 { "passwordSearchPlaceholder", 50 { "passwordSearchPlaceholder",
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 for (size_t i = 0; i < password_exception_list.size(); ++i) { 160 for (size_t i = 0; i < password_exception_list.size(); ++i) {
157 entries.Append(new StringValue( 161 entries.Append(new StringValue(
158 net::FormatUrl(password_exception_list[i]->origin, languages_))); 162 net::FormatUrl(password_exception_list[i]->origin, languages_)));
159 } 163 }
160 164
161 web_ui()->CallJavascriptFunction("PasswordManager.setPasswordExceptionsList", 165 web_ui()->CallJavascriptFunction("PasswordManager.setPasswordExceptionsList",
162 entries); 166 entries);
163 } 167 }
164 168
165 } // namespace options 169 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698