| 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 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1416 #if defined(OS_CHROMEOS) | 1416 #if defined(OS_CHROMEOS) |
| 1417 html_source->AddBoolean("showCupsPrintingFeatures", | 1417 html_source->AddBoolean("showCupsPrintingFeatures", |
| 1418 base::CommandLine::ForCurrentProcess()->HasSwitch( | 1418 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1419 ::switches::kEnableNativeCups)); | 1419 ::switches::kEnableNativeCups)); |
| 1420 #endif | 1420 #endif |
| 1421 } | 1421 } |
| 1422 | 1422 |
| 1423 void AddPrivacyStrings(content::WebUIDataSource* html_source, | 1423 void AddPrivacyStrings(content::WebUIDataSource* html_source, |
| 1424 Profile* profile) { | 1424 Profile* profile) { |
| 1425 LocalizedString localized_strings[] = { | 1425 LocalizedString localized_strings[] = { |
| 1426 {"privacyPageTitle", IDS_SETTINGS_PRIVACY}, | 1426 {"privacyPageTitle", IDS_SETTINGS_PRIVACY}, |
| 1427 {"linkDoctorPref", IDS_SETTINGS_LINKDOCTOR_PREF}, | 1427 {"linkDoctorPref", IDS_SETTINGS_LINKDOCTOR_PREF}, |
| 1428 {"searchSuggestPref", IDS_SETTINGS_SUGGEST_PREF}, | 1428 {"searchSuggestPref", IDS_SETTINGS_SUGGEST_PREF}, |
| 1429 {"networkPredictionEnabled", | 1429 {"networkPredictionEnabled", |
| 1430 IDS_SETTINGS_NETWORK_PREDICTION_ENABLED_DESCRIPTION}, | 1430 IDS_SETTINGS_NETWORK_PREDICTION_ENABLED_DESCRIPTION}, |
| 1431 {"safeBrowsingEnableProtection", | 1431 {"safeBrowsingEnableProtection", |
| 1432 IDS_SETTINGS_SAFEBROWSING_ENABLEPROTECTION}, | 1432 IDS_SETTINGS_SAFEBROWSING_ENABLEPROTECTION}, |
| 1433 {"spellingPref", IDS_SETTINGS_SPELLING_PREF}, | 1433 {"spellingPref", IDS_SETTINGS_SPELLING_PREF}, |
| 1434 {"spellingDescription", IDS_SETTINGS_SPELLING_DESCRIPTION}, | 1434 {"spellingDescription", IDS_SETTINGS_SPELLING_DESCRIPTION}, |
| 1435 #if defined(OS_CHROMEOS) | 1435 #if defined(OS_CHROMEOS) |
| 1436 {"enableLogging", IDS_SETTINGS_ENABLE_LOGGING_DIAGNOSTIC_AND_USAGE_DATA}, | 1436 {"enableLogging", IDS_SETTINGS_ENABLE_LOGGING_DIAGNOSTIC_AND_USAGE_DATA}, |
| 1437 #else | 1437 #else |
| 1438 {"enableLogging", IDS_SETTINGS_ENABLE_LOGGING}, | 1438 {"enableLogging", IDS_SETTINGS_ENABLE_LOGGING}, |
| 1439 #endif | 1439 #endif |
| 1440 {"doNotTrack", IDS_SETTINGS_ENABLE_DO_NOT_TRACK}, | 1440 {"doNotTrack", IDS_SETTINGS_ENABLE_DO_NOT_TRACK}, |
| 1441 {"enableContentProtectionAttestation", | 1441 {"doNotTrackDialogTitle", IDS_SETTINGS_ENABLE_DO_NOT_TRACK_DIALOG_TITLE}, |
| 1442 IDS_SETTINGS_ENABLE_CONTENT_PROTECTION_ATTESTATION}, | 1442 {"doNotTrackDialogMessage", IDS_SETTINGS_ENABLE_DO_NOT_TRACK_DIALOG_TEXT}, |
| 1443 {"wakeOnWifi", IDS_SETTINGS_WAKE_ON_WIFI_DESCRIPTION}, | 1443 {"enableContentProtectionAttestation", |
| 1444 {"manageCertificates", IDS_SETTINGS_MANAGE_CERTIFICATES}, | 1444 IDS_SETTINGS_ENABLE_CONTENT_PROTECTION_ATTESTATION}, |
| 1445 {"manageCertificatesDescription", | 1445 {"wakeOnWifi", IDS_SETTINGS_WAKE_ON_WIFI_DESCRIPTION}, |
| 1446 IDS_SETTINGS_MANAGE_CERTIFICATES_DESCRIPTION}, | 1446 {"manageCertificates", IDS_SETTINGS_MANAGE_CERTIFICATES}, |
| 1447 {"contentSettings", IDS_SETTINGS_CONTENT_SETTINGS}, | 1447 {"manageCertificatesDescription", |
| 1448 {"siteSettings", IDS_SETTINGS_SITE_SETTINGS}, | 1448 IDS_SETTINGS_MANAGE_CERTIFICATES_DESCRIPTION}, |
| 1449 {"siteSettingsDescription", IDS_SETTINGS_SITE_SETTINGS_DESCRIPTION}, | 1449 {"contentSettings", IDS_SETTINGS_CONTENT_SETTINGS}, |
| 1450 {"clearBrowsingData", IDS_SETTINGS_CLEAR_DATA}, | 1450 {"siteSettings", IDS_SETTINGS_SITE_SETTINGS}, |
| 1451 {"clearBrowsingDataDescription", IDS_SETTINGS_CLEAR_DATA_DESCRIPTION}, | 1451 {"siteSettingsDescription", IDS_SETTINGS_SITE_SETTINGS_DESCRIPTION}, |
| 1452 {"titleAndCount", IDS_SETTINGS_TITLE_AND_COUNT}, | 1452 {"clearBrowsingData", IDS_SETTINGS_CLEAR_DATA}, |
| 1453 {"clearBrowsingDataDescription", IDS_SETTINGS_CLEAR_DATA_DESCRIPTION}, |
| 1454 {"titleAndCount", IDS_SETTINGS_TITLE_AND_COUNT}, |
| 1453 }; | 1455 }; |
| 1454 AddLocalizedStringsBulk(html_source, localized_strings, | 1456 AddLocalizedStringsBulk(html_source, localized_strings, |
| 1455 arraysize(localized_strings)); | 1457 arraysize(localized_strings)); |
| 1456 | 1458 |
| 1457 html_source->AddLocalizedString( | 1459 html_source->AddLocalizedString( |
| 1458 "safeBrowsingEnableExtendedReporting", | 1460 "safeBrowsingEnableExtendedReporting", |
| 1459 safe_browsing::ChooseOptInTextResource( | 1461 safe_browsing::ChooseOptInTextResource( |
| 1460 *profile->GetPrefs(), | 1462 *profile->GetPrefs(), |
| 1461 IDS_SETTINGS_SAFEBROWSING_ENABLE_EXTENDED_REPORTING, | 1463 IDS_SETTINGS_SAFEBROWSING_ENABLE_EXTENDED_REPORTING, |
| 1462 IDS_SETTINGS_SAFEBROWSING_ENABLE_SCOUT_REPORTING)); | 1464 IDS_SETTINGS_SAFEBROWSING_ENABLE_SCOUT_REPORTING)); |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1971 | 1973 |
| 1972 #if defined(OS_CHROMEOS) | 1974 #if defined(OS_CHROMEOS) |
| 1973 chromeos::network_element::AddLocalizedStrings(html_source); | 1975 chromeos::network_element::AddLocalizedStrings(html_source); |
| 1974 #endif | 1976 #endif |
| 1975 policy_indicator::AddLocalizedStrings(html_source); | 1977 policy_indicator::AddLocalizedStrings(html_source); |
| 1976 | 1978 |
| 1977 html_source->SetJsonPath(kLocalizedStringsFile); | 1979 html_source->SetJsonPath(kLocalizedStringsFile); |
| 1978 } | 1980 } |
| 1979 | 1981 |
| 1980 } // namespace settings | 1982 } // namespace settings |
| OLD | NEW |