| 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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 {"noPasswordsFound", IDS_SETTINGS_PASSWORDS_NONE}, | 1080 {"noPasswordsFound", IDS_SETTINGS_PASSWORDS_NONE}, |
| 1081 {"noExceptionsFound", IDS_SETTINGS_PASSWORDS_EXCEPTIONS_NONE}, | 1081 {"noExceptionsFound", IDS_SETTINGS_PASSWORDS_EXCEPTIONS_NONE}, |
| 1082 }; | 1082 }; |
| 1083 | 1083 |
| 1084 html_source->AddString( | 1084 html_source->AddString( |
| 1085 "managePasswordsLabel", | 1085 "managePasswordsLabel", |
| 1086 l10n_util::GetStringFUTF16( | 1086 l10n_util::GetStringFUTF16( |
| 1087 IDS_SETTINGS_PASSWORDS_MANAGE_PASSWORDS, | 1087 IDS_SETTINGS_PASSWORDS_MANAGE_PASSWORDS, |
| 1088 base::ASCIIToUTF16( | 1088 base::ASCIIToUTF16( |
| 1089 password_manager::kPasswordManagerAccountDashboardURL))); | 1089 password_manager::kPasswordManagerAccountDashboardURL))); |
| 1090 html_source->AddString("passwordManagerLearnMoreURL", |
| 1091 chrome::kPasswordManagerLearnMoreURL); |
| 1090 html_source->AddString( | 1092 html_source->AddString( |
| 1091 "manageAddressesUrl", | 1093 "manageAddressesUrl", |
| 1092 autofill::payments::GetManageAddressesUrl(0).spec()); | 1094 autofill::payments::GetManageAddressesUrl(0).spec()); |
| 1093 html_source->AddString( | 1095 html_source->AddString( |
| 1094 "manageCreditCardsUrl", | 1096 "manageCreditCardsUrl", |
| 1095 autofill::payments::GetManageInstrumentsUrl(0).spec()); | 1097 autofill::payments::GetManageInstrumentsUrl(0).spec()); |
| 1096 | 1098 |
| 1097 AddLocalizedStringsBulk(html_source, localized_strings, | 1099 AddLocalizedStringsBulk(html_source, localized_strings, |
| 1098 arraysize(localized_strings)); | 1100 arraysize(localized_strings)); |
| 1099 } | 1101 } |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1437 html_source->AddLocalizedString( | 1439 html_source->AddLocalizedString( |
| 1438 "safeBrowsingEnableExtendedReporting", | 1440 "safeBrowsingEnableExtendedReporting", |
| 1439 safe_browsing::ChooseOptInTextResource( | 1441 safe_browsing::ChooseOptInTextResource( |
| 1440 *profile->GetPrefs(), | 1442 *profile->GetPrefs(), |
| 1441 IDS_SETTINGS_SAFEBROWSING_ENABLE_EXTENDED_REPORTING, | 1443 IDS_SETTINGS_SAFEBROWSING_ENABLE_EXTENDED_REPORTING, |
| 1442 IDS_SETTINGS_SAFEBROWSING_ENABLE_SCOUT_REPORTING)); | 1444 IDS_SETTINGS_SAFEBROWSING_ENABLE_SCOUT_REPORTING)); |
| 1443 html_source->AddString("improveBrowsingExperience", | 1445 html_source->AddString("improveBrowsingExperience", |
| 1444 l10n_util::GetStringFUTF16( | 1446 l10n_util::GetStringFUTF16( |
| 1445 IDS_SETTINGS_IMPROVE_BROWSING_EXPERIENCE, | 1447 IDS_SETTINGS_IMPROVE_BROWSING_EXPERIENCE, |
| 1446 base::ASCIIToUTF16(chrome::kPrivacyLearnMoreURL))); | 1448 base::ASCIIToUTF16(chrome::kPrivacyLearnMoreURL))); |
| 1449 html_source->AddString( |
| 1450 "exceptionsLearnMoreURL", |
| 1451 base::ASCIIToUTF16(chrome::kContentSettingsExceptionsLearnMoreURL)); |
| 1447 } | 1452 } |
| 1448 | 1453 |
| 1449 void AddSearchInSettingsStrings(content::WebUIDataSource* html_source) { | 1454 void AddSearchInSettingsStrings(content::WebUIDataSource* html_source) { |
| 1450 LocalizedString localized_strings[] = { | 1455 LocalizedString localized_strings[] = { |
| 1451 {"searchPrompt", IDS_SETTINGS_SEARCH_PROMPT}, | 1456 {"searchPrompt", IDS_SETTINGS_SEARCH_PROMPT}, |
| 1452 {"searchNoResults", IDS_SETTINGS_SEARCH_NO_RESULTS}, | 1457 {"searchNoResults", IDS_SETTINGS_SEARCH_NO_RESULTS}, |
| 1453 // TODO(dpapad): IDS_DOWNLOAD_CLEAR_SEARCH and IDS_MD_HISTORY_CLEAR_SEARCH | 1458 // TODO(dpapad): IDS_DOWNLOAD_CLEAR_SEARCH and IDS_MD_HISTORY_CLEAR_SEARCH |
| 1454 // are identical, merge them to one and re-use here. | 1459 // are identical, merge them to one and re-use here. |
| 1455 {"clearSearch", IDS_DOWNLOAD_CLEAR_SEARCH}, | 1460 {"clearSearch", IDS_DOWNLOAD_CLEAR_SEARCH}, |
| 1456 }; | 1461 }; |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1933 | 1938 |
| 1934 #if defined(OS_CHROMEOS) | 1939 #if defined(OS_CHROMEOS) |
| 1935 chromeos::network_element::AddLocalizedStrings(html_source); | 1940 chromeos::network_element::AddLocalizedStrings(html_source); |
| 1936 #endif | 1941 #endif |
| 1937 policy_indicator::AddLocalizedStrings(html_source); | 1942 policy_indicator::AddLocalizedStrings(html_source); |
| 1938 | 1943 |
| 1939 html_source->SetJsonPath(kLocalizedStringsFile); | 1944 html_source->SetJsonPath(kLocalizedStringsFile); |
| 1940 } | 1945 } |
| 1941 | 1946 |
| 1942 } // namespace settings | 1947 } // namespace settings |
| OLD | NEW |