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

Unified Diff: chrome/browser/ui/webui/options2/browser_options_handler2.cc

Issue 10222017: Make password generation switched by a preference in chrome settings rather than a command line fla… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change DCHECK_EQ to DCHECK to get around some type convertion issue. Created 8 years, 7 months 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
« no previous file with comments | « chrome/browser/ui/webui/options2/browser_options_handler2.h ('k') | chrome/common/autofill_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options2/browser_options_handler2.cc
diff --git a/chrome/browser/ui/webui/options2/browser_options_handler2.cc b/chrome/browser/ui/webui/options2/browser_options_handler2.cc
index 40ddcfe1810beb611146379272b36663174307e8..954334c11946168f45aeaef40587bdb2ac7afe57 100644
--- a/chrome/browser/ui/webui/options2/browser_options_handler2.cc
+++ b/chrome/browser/ui/webui/options2/browser_options_handler2.cc
@@ -214,6 +214,8 @@ void BrowserOptionsHandler::GetLocalizedValues(DictionaryValue* values) {
{ "passwordsAndAutofillGroupName",
IDS_OPTIONS_PASSWORDS_AND_FORMS_GROUP_NAME },
{ "passwordManagerEnabled", IDS_OPTIONS_PASSWORD_MANAGER_ENABLE },
+ { "passwordGenerationEnabledDescription",
+ IDS_OPTIONS_PASSWORD_GENERATION_ENABLED_LABEL },
{ "privacyClearDataButton", IDS_OPTIONS_PRIVACY_CLEAR_DATA_BUTTON },
{ "privacyContentSettingsButton",
IDS_OPTIONS_PRIVACY_CONTENT_SETTINGS_BUTTON },
@@ -612,6 +614,7 @@ void BrowserOptionsHandler::InitializePage() {
SetupMetricsReportingCheckbox();
SetupMetricsReportingSettingVisibility();
+ SetupPasswordGenerationSettingVisibility();
SetupFontSizeSelector();
SetupPageZoomSelector();
SetupAutoOpenFileTypes();
@@ -1327,6 +1330,14 @@ void BrowserOptionsHandler::SetupMetricsReportingSettingVisibility() {
#endif
}
+void BrowserOptionsHandler::SetupPasswordGenerationSettingVisibility() {
+ base::FundamentalValue visible(
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnablePasswordGeneration));
+ web_ui()->CallJavascriptFunction(
+ "BrowserOptions.setPasswordGenerationSettingVisibility", visible);
+}
+
void BrowserOptionsHandler::SetupFontSizeSelector() {
// We're only interested in integer values, so convert to int.
base::FundamentalValue font_size(default_font_size_.GetValue());
« no previous file with comments | « chrome/browser/ui/webui/options2/browser_options_handler2.h ('k') | chrome/common/autofill_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698