OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/settings/md_settings_localized_strings_provide
r.h" | 5 #include "chrome/browser/ui/webui/settings/md_settings_localized_strings_provide
r.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/i18n/number_formatting.h" | 10 #include "base/i18n/number_formatting.h" |
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1221 | 1221 |
1222 html_source->AddString("syncErrorHelpUrl", chrome::kSyncErrorsHelpURL); | 1222 html_source->AddString("syncErrorHelpUrl", chrome::kSyncErrorsHelpURL); |
1223 | 1223 |
1224 html_source->AddString("activityControlsUrl", | 1224 html_source->AddString("activityControlsUrl", |
1225 chrome::kGoogleAccountActivityControlsURL); | 1225 chrome::kGoogleAccountActivityControlsURL); |
1226 | 1226 |
1227 html_source->AddBoolean("profileShortcutsEnabled", | 1227 html_source->AddBoolean("profileShortcutsEnabled", |
1228 ProfileShortcutManager::IsFeatureEnabled()); | 1228 ProfileShortcutManager::IsFeatureEnabled()); |
1229 } | 1229 } |
1230 | 1230 |
1231 void AddPrintingStrings(content::WebUIDataSource* html_source, | 1231 void AddPrintingStrings(content::WebUIDataSource* html_source) { |
1232 Profile* profile) { | |
1233 LocalizedString localized_strings[] = { | 1232 LocalizedString localized_strings[] = { |
1234 {"printingPageTitle", IDS_SETTINGS_PRINTING}, | 1233 {"printingPageTitle", IDS_SETTINGS_PRINTING}, |
1235 {"printingCloudPrintLearnMoreLabel", | 1234 {"printingCloudPrintLearnMoreLabel", |
1236 IDS_SETTINGS_PRINTING_CLOUD_PRINT_LEARN_MORE_LABEL}, | 1235 IDS_SETTINGS_PRINTING_CLOUD_PRINT_LEARN_MORE_LABEL}, |
1237 {"printingNotificationsLabel", IDS_SETTINGS_PRINTING_NOTIFICATIONS_LABEL}, | 1236 {"printingNotificationsLabel", IDS_SETTINGS_PRINTING_NOTIFICATIONS_LABEL}, |
1238 {"printingManageCloudPrintDevices", | 1237 {"printingManageCloudPrintDevices", |
1239 IDS_SETTINGS_PRINTING_MANAGE_CLOUD_PRINT_DEVICES}, | 1238 IDS_SETTINGS_PRINTING_MANAGE_CLOUD_PRINT_DEVICES}, |
1240 {"printingManageCloudPrintDevicesDescription", | 1239 {"printingManageCloudPrintDevicesDescription", |
1241 IDS_SETTINGS_PRINTING_MANAGE_CLOUD_PRINT_DEVICES_DESCRIPTION}, | 1240 IDS_SETTINGS_PRINTING_MANAGE_CLOUD_PRINT_DEVICES_DESCRIPTION}, |
1242 {"cloudPrintersTitle", IDS_SETTINGS_PRINTING_CLOUD_PRINTERS}, | 1241 {"cloudPrintersTitle", IDS_SETTINGS_PRINTING_CLOUD_PRINTERS}, |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1303 AddLocalizedStringsBulk(html_source, localized_strings, | 1302 AddLocalizedStringsBulk(html_source, localized_strings, |
1304 arraysize(localized_strings)); | 1303 arraysize(localized_strings)); |
1305 | 1304 |
1306 html_source->AddString("devicesUrl", chrome::kChromeUIDevicesURL); | 1305 html_source->AddString("devicesUrl", chrome::kChromeUIDevicesURL); |
1307 html_source->AddString("printingCloudPrintLearnMoreUrl", | 1306 html_source->AddString("printingCloudPrintLearnMoreUrl", |
1308 chrome::kCloudPrintLearnMoreURL); | 1307 chrome::kCloudPrintLearnMoreURL); |
1309 | 1308 |
1310 #if defined(OS_CHROMEOS) | 1309 #if defined(OS_CHROMEOS) |
1311 html_source->AddBoolean("showCupsPrintingFeatures", | 1310 html_source->AddBoolean("showCupsPrintingFeatures", |
1312 base::CommandLine::ForCurrentProcess()->HasSwitch( | 1311 base::CommandLine::ForCurrentProcess()->HasSwitch( |
1313 ::switches::kEnableNativeCups) && | 1312 ::switches::kEnableNativeCups)); |
1314 !profile->IsOffTheRecord()); | |
1315 #endif | 1313 #endif |
1316 } | 1314 } |
1317 | 1315 |
1318 void AddPrivacyStrings(content::WebUIDataSource* html_source, | 1316 void AddPrivacyStrings(content::WebUIDataSource* html_source, |
1319 Profile* profile) { | 1317 Profile* profile) { |
1320 LocalizedString localized_strings[] = { | 1318 LocalizedString localized_strings[] = { |
1321 {"privacyPageTitle", IDS_SETTINGS_PRIVACY}, | 1319 {"privacyPageTitle", IDS_SETTINGS_PRIVACY}, |
1322 {"linkDoctorPref", IDS_SETTINGS_LINKDOCTOR_PREF}, | 1320 {"linkDoctorPref", IDS_SETTINGS_LINKDOCTOR_PREF}, |
1323 {"searchSuggestPref", IDS_SETTINGS_SUGGEST_PREF}, | 1321 {"searchSuggestPref", IDS_SETTINGS_SUGGEST_PREF}, |
1324 {"networkPredictionEnabled", | 1322 {"networkPredictionEnabled", |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1822 AddA11yStrings(html_source); | 1820 AddA11yStrings(html_source); |
1823 AddAboutStrings(html_source); | 1821 AddAboutStrings(html_source); |
1824 AddAppearanceStrings(html_source, profile); | 1822 AddAppearanceStrings(html_source, profile); |
1825 AddClearBrowsingDataStrings(html_source); | 1823 AddClearBrowsingDataStrings(html_source); |
1826 AddCommonStrings(html_source, profile); | 1824 AddCommonStrings(html_source, profile); |
1827 AddDownloadsStrings(html_source); | 1825 AddDownloadsStrings(html_source); |
1828 AddLanguagesStrings(html_source); | 1826 AddLanguagesStrings(html_source); |
1829 AddOnStartupStrings(html_source); | 1827 AddOnStartupStrings(html_source); |
1830 AddPasswordsAndFormsStrings(html_source); | 1828 AddPasswordsAndFormsStrings(html_source); |
1831 AddPeopleStrings(html_source); | 1829 AddPeopleStrings(html_source); |
1832 AddPrintingStrings(html_source, profile); | 1830 AddPrintingStrings(html_source); |
1833 AddPrivacyStrings(html_source, profile); | 1831 AddPrivacyStrings(html_source, profile); |
1834 AddResetStrings(html_source); | 1832 AddResetStrings(html_source); |
1835 AddSearchEnginesStrings(html_source); | 1833 AddSearchEnginesStrings(html_source); |
1836 AddSearchInSettingsStrings(html_source); | 1834 AddSearchInSettingsStrings(html_source); |
1837 AddSearchStrings(html_source); | 1835 AddSearchStrings(html_source); |
1838 AddSiteSettingsStrings(html_source, profile); | 1836 AddSiteSettingsStrings(html_source, profile); |
1839 AddUsersStrings(html_source); | 1837 AddUsersStrings(html_source); |
1840 AddWebContentStrings(html_source); | 1838 AddWebContentStrings(html_source); |
1841 | 1839 |
1842 #if defined(OS_CHROMEOS) | 1840 #if defined(OS_CHROMEOS) |
(...skipping 15 matching lines...) Expand all Loading... |
1858 #if defined(USE_NSS_CERTS) | 1856 #if defined(USE_NSS_CERTS) |
1859 AddCertificateManagerStrings(html_source); | 1857 AddCertificateManagerStrings(html_source); |
1860 #endif | 1858 #endif |
1861 | 1859 |
1862 policy_indicator::AddLocalizedStrings(html_source); | 1860 policy_indicator::AddLocalizedStrings(html_source); |
1863 | 1861 |
1864 html_source->SetJsonPath(kLocalizedStringsFile); | 1862 html_source->SetJsonPath(kLocalizedStringsFile); |
1865 } | 1863 } |
1866 | 1864 |
1867 } // namespace settings | 1865 } // namespace settings |
OLD | NEW |