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

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: rebase. remove one unneeded commit. add support for changes in 39253002 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"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "chrome/browser/chrome_notification_types.h" 12 #include "chrome/browser/chrome_notification_types.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/common/pref_names.h" 14 #include "chrome/common/pref_names.h"
15 #include "chrome/common/url_constants.h" 15 #include "chrome/common/url_constants.h"
16 #include "components/autofill/core/common/password_form.h" 16 #include "components/autofill/core/common/password_form.h"
17 #include "content/public/browser/notification_details.h" 17 #include "content/public/browser/notification_details.h"
18 #include "content/public/browser/notification_source.h" 18 #include "content/public/browser/notification_source.h"
19 #include "content/public/browser/user_metrics.h" 19 #include "content/public/browser/user_metrics.h"
20 #include "content/public/browser/web_contents.h"
Bernhard Bauer 2013/11/27 17:04:52 Also here. I think nothing in this file needs to k
Will Harris 2013/12/02 23:19:27 Done.
20 #include "content/public/browser/web_ui.h" 21 #include "content/public/browser/web_ui.h"
21 #include "grit/chromium_strings.h" 22 #include "grit/chromium_strings.h"
22 #include "grit/generated_resources.h" 23 #include "grit/generated_resources.h"
23 #include "net/base/net_util.h" 24 #include "net/base/net_util.h"
24 #include "ui/base/l10n/l10n_util.h" 25 #include "ui/base/l10n/l10n_util.h"
25 26
26 namespace options { 27 namespace options {
27 28
28 PasswordManagerHandler::PasswordManagerHandler() 29 PasswordManagerHandler::PasswordManagerHandler()
29 : password_manager_presenter_(this) {} 30 : password_manager_presenter_(this) {}
30 31
31 PasswordManagerHandler::~PasswordManagerHandler() {} 32 PasswordManagerHandler::~PasswordManagerHandler() {}
32 33
33 Profile* PasswordManagerHandler::GetProfile() { 34 Profile* PasswordManagerHandler::GetProfile() {
34 return Profile::FromWebUI(web_ui()); 35 return Profile::FromWebUI(web_ui());
35 } 36 }
36 37
38 content::WebContents* PasswordManagerHandler::GetWebContents() {
39 return web_ui()->GetWebContents();
40 }
41
37 void PasswordManagerHandler::GetLocalizedValues( 42 void PasswordManagerHandler::GetLocalizedValues(
38 DictionaryValue* localized_strings) { 43 DictionaryValue* localized_strings) {
39 DCHECK(localized_strings); 44 DCHECK(localized_strings);
40 45
41 static const OptionsStringResource resources[] = { 46 static const OptionsStringResource resources[] = {
42 { "savedPasswordsTitle", 47 { "savedPasswordsTitle",
43 IDS_PASSWORDS_SHOW_PASSWORDS_TAB_TITLE }, 48 IDS_PASSWORDS_SHOW_PASSWORDS_TAB_TITLE },
44 { "passwordExceptionsTitle", 49 { "passwordExceptionsTitle",
45 IDS_PASSWORDS_EXCEPTIONS_TAB_TITLE }, 50 IDS_PASSWORDS_EXCEPTIONS_TAB_TITLE },
46 { "passwordSearchPlaceholder", 51 { "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) { 161 for (size_t i = 0; i < password_exception_list.size(); ++i) {
157 entries.Append(new StringValue( 162 entries.Append(new StringValue(
158 net::FormatUrl(password_exception_list[i]->origin, languages_))); 163 net::FormatUrl(password_exception_list[i]->origin, languages_)));
159 } 164 }
160 165
161 web_ui()->CallJavascriptFunction("PasswordManager.setPasswordExceptionsList", 166 web_ui()->CallJavascriptFunction("PasswordManager.setPasswordExceptionsList",
162 entries); 167 entries);
163 } 168 }
164 169
165 } // namespace options 170 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698