OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/dom_ui/options/advanced_options_handler.h" | 5 #include "chrome/browser/dom_ui/options/advanced_options_handler.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 AdvancedOptionsHandler::~AdvancedOptionsHandler() { | 52 AdvancedOptionsHandler::~AdvancedOptionsHandler() { |
53 } | 53 } |
54 | 54 |
55 void AdvancedOptionsHandler::GetLocalizedValues( | 55 void AdvancedOptionsHandler::GetLocalizedValues( |
56 DictionaryValue* localized_strings) { | 56 DictionaryValue* localized_strings) { |
57 DCHECK(localized_strings); | 57 DCHECK(localized_strings); |
58 | 58 |
59 localized_strings->SetString("privacyLearnMoreURL", | 59 localized_strings->SetString("privacyLearnMoreURL", |
60 l10n_util::GetStringUTF16(IDS_LEARN_MORE_PRIVACY_URL)); | 60 l10n_util::GetStringUTF16(IDS_LEARN_MORE_PRIVACY_URL)); |
61 localized_strings->SetString("privacyLearnMoreLabel", | |
62 l10n_util::GetStringUTF16(IDS_OPTIONS_LEARN_MORE_LABEL)); | |
63 localized_strings->SetString("downloadLocationGroupName", | 61 localized_strings->SetString("downloadLocationGroupName", |
64 l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_GROUP_NAME)); | 62 l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_GROUP_NAME)); |
65 localized_strings->SetString("downloadLocationBrowseButton", | 63 localized_strings->SetString("downloadLocationBrowseButton", |
66 l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_BUTTON)); | 64 l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_BUTTON)); |
67 localized_strings->SetString("downloadLocationBrowseTitle", | 65 localized_strings->SetString("downloadLocationBrowseTitle", |
68 l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE)); | 66 l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE)); |
69 localized_strings->SetString("downloadLocationBrowseWindowTitle", | 67 localized_strings->SetString("downloadLocationBrowseWindowTitle", |
70 l10n_util::GetStringUTF16( | 68 l10n_util::GetStringUTF16( |
71 IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_WINDOW_TITLE)); | 69 IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_WINDOW_TITLE)); |
72 localized_strings->SetString("downloadLocationAskForSaveLocation", | 70 localized_strings->SetString("downloadLocationAskForSaveLocation", |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 bool background_mode_enabled = CommandLine::ForCurrentProcess()->HasSwitch( | 136 bool background_mode_enabled = CommandLine::ForCurrentProcess()->HasSwitch( |
139 switches::kEnableBackgroundMode); | 137 switches::kEnableBackgroundMode); |
140 localized_strings->SetString("enable-background-mode", | 138 localized_strings->SetString("enable-background-mode", |
141 background_mode_enabled ? "true" : "false"); | 139 background_mode_enabled ? "true" : "false"); |
142 localized_strings->SetString("advancedSectionTitleChromeApps", | 140 localized_strings->SetString("advancedSectionTitleChromeApps", |
143 l10n_util::GetStringUTF16( | 141 l10n_util::GetStringUTF16( |
144 IDS_OPTIONS_ADVANCED_SECTION_TITLE_CHROME_APPS)); | 142 IDS_OPTIONS_ADVANCED_SECTION_TITLE_CHROME_APPS)); |
145 localized_strings->SetString("chromeAppsEnableBackgroundMode", | 143 localized_strings->SetString("chromeAppsEnableBackgroundMode", |
146 l10n_util::GetStringUTF16( | 144 l10n_util::GetStringUTF16( |
147 IDS_OPTIONS_CHROME_APPS_ENABLE_BACKGROUND_MODE)); | 145 IDS_OPTIONS_CHROME_APPS_ENABLE_BACKGROUND_MODE)); |
148 localized_strings->SetString("chromeAppsLearnMoreBackgroundModeLabel", | |
149 l10n_util::GetStringUTF16(IDS_OPTIONS_LEARN_MORE_LABEL)); | |
150 localized_strings->SetString("chromeAppsLearnMoreBackgroundModeURL", | 146 localized_strings->SetString("chromeAppsLearnMoreBackgroundModeURL", |
151 l10n_util::GetStringUTF16(IDS_LEARN_MORE_BACKGROUND_MODE_URL)); | 147 l10n_util::GetStringUTF16(IDS_LEARN_MORE_BACKGROUND_MODE_URL)); |
152 #if !defined(OS_CHROMEOS) | 148 #if !defined(OS_CHROMEOS) |
153 // Add the cloud print proxy management ui section if it's been runtime | 149 // Add the cloud print proxy management ui section if it's been runtime |
154 // enabled. | 150 // enabled. |
155 localized_strings->SetString("enable-cloud-print-proxy", | 151 localized_strings->SetString("enable-cloud-print-proxy", |
156 cloud_print_proxy_ui_enabled_ ? "true" : "false"); | 152 cloud_print_proxy_ui_enabled_ ? "true" : "false"); |
157 localized_strings->SetString("advancedSectionTitleCloudPrint", | 153 localized_strings->SetString("advancedSectionTitleCloudPrint", |
158 l10n_util::GetStringUTF16( | 154 l10n_util::GetStringUTF16( |
159 IDS_OPTIONS_ADVANCED_SECTION_TITLE_CLOUD_PRINT)); | 155 IDS_OPTIONS_ADVANCED_SECTION_TITLE_CLOUD_PRINT)); |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 FundamentalValue useSSL3Value(useSSL3Setting); | 591 FundamentalValue useSSL3Value(useSSL3Setting); |
596 dom_ui_->CallJavascriptFunction( | 592 dom_ui_->CallJavascriptFunction( |
597 L"options.AdvancedOptions.SetUseSSL3CheckboxState", | 593 L"options.AdvancedOptions.SetUseSSL3CheckboxState", |
598 useSSL3Value, disabledValue); | 594 useSSL3Value, disabledValue); |
599 FundamentalValue useTLS1Value(useTLS1Setting); | 595 FundamentalValue useTLS1Value(useTLS1Setting); |
600 dom_ui_->CallJavascriptFunction( | 596 dom_ui_->CallJavascriptFunction( |
601 L"options.AdvancedOptions.SetUseTLS1CheckboxState", | 597 L"options.AdvancedOptions.SetUseTLS1CheckboxState", |
602 useTLS1Value, disabledValue); | 598 useTLS1Value, disabledValue); |
603 } | 599 } |
604 #endif | 600 #endif |
OLD | NEW |