| 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 11 matching lines...) Expand all Loading... |
| 22 #include "chrome/common/url_constants.h" | 22 #include "chrome/common/url_constants.h" |
| 23 #include "chrome/grit/chromium_strings.h" | 23 #include "chrome/grit/chromium_strings.h" |
| 24 #include "chrome/grit/generated_resources.h" | 24 #include "chrome/grit/generated_resources.h" |
| 25 #include "chrome/grit/locale_settings.h" | 25 #include "chrome/grit/locale_settings.h" |
| 26 #include "components/autofill/core/browser/payments/payments_service_url.h" | 26 #include "components/autofill/core/browser/payments/payments_service_url.h" |
| 27 #include "components/autofill/core/common/autofill_constants.h" | 27 #include "components/autofill/core/common/autofill_constants.h" |
| 28 #include "components/google/core/browser/google_util.h" | 28 #include "components/google/core/browser/google_util.h" |
| 29 #include "components/password_manager/core/browser/password_manager_constants.h" | 29 #include "components/password_manager/core/browser/password_manager_constants.h" |
| 30 #include "components/safe_browsing_db/safe_browsing_prefs.h" | 30 #include "components/safe_browsing_db/safe_browsing_prefs.h" |
| 31 #include "components/strings/grit/components_strings.h" | 31 #include "components/strings/grit/components_strings.h" |
| 32 #include "components/subresource_filter/core/browser/subresource_filter_features
.h" |
| 32 #include "content/public/browser/web_ui_data_source.h" | 33 #include "content/public/browser/web_ui_data_source.h" |
| 33 #include "ui/base/l10n/l10n_util.h" | 34 #include "ui/base/l10n/l10n_util.h" |
| 34 | 35 |
| 35 #if defined(OS_CHROMEOS) | 36 #if defined(OS_CHROMEOS) |
| 36 #include "ash/common/ash_switches.h" | 37 #include "ash/common/ash_switches.h" |
| 37 #include "ash/common/system/chromeos/devicetype_utils.h" | 38 #include "ash/common/system/chromeos/devicetype_utils.h" |
| 38 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" | 39 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" |
| 39 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" | 40 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_fact
ory.h" |
| 40 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 41 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 41 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 42 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| (...skipping 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1765 {"handlerIsDefault", IDS_SETTINGS_SITE_SETTINGS_HANDLER_IS_DEFAULT}, | 1766 {"handlerIsDefault", IDS_SETTINGS_SITE_SETTINGS_HANDLER_IS_DEFAULT}, |
| 1766 {"handlerSetDefault", IDS_SETTINGS_SITE_SETTINGS_HANDLER_SET_DEFAULT}, | 1767 {"handlerSetDefault", IDS_SETTINGS_SITE_SETTINGS_HANDLER_SET_DEFAULT}, |
| 1767 {"handlerRemove", IDS_SETTINGS_SITE_SETTINGS_REMOVE}, | 1768 {"handlerRemove", IDS_SETTINGS_SITE_SETTINGS_REMOVE}, |
| 1768 {"adobeFlashStorage", IDS_SETTINGS_SITE_SETTINGS_ADOBE_FLASH_SETTINGS}, | 1769 {"adobeFlashStorage", IDS_SETTINGS_SITE_SETTINGS_ADOBE_FLASH_SETTINGS}, |
| 1769 {"learnMore", IDS_SETTINGS_SITE_SETTINGS_LEARN_MORE}, | 1770 {"learnMore", IDS_SETTINGS_SITE_SETTINGS_LEARN_MORE}, |
| 1770 {"incognitoSite", IDS_SETTINGS_SITE_SETTINGS_INCOGNITO}, | 1771 {"incognitoSite", IDS_SETTINGS_SITE_SETTINGS_INCOGNITO}, |
| 1771 {"incognitoSiteOnly", IDS_SETTINGS_SITE_SETTINGS_INCOGNITO_ONLY}, | 1772 {"incognitoSiteOnly", IDS_SETTINGS_SITE_SETTINGS_INCOGNITO_ONLY}, |
| 1772 {"embeddedIncognitoSite", IDS_SETTINGS_SITE_SETTINGS_INCOGNITO_EMBEDDED}, | 1773 {"embeddedIncognitoSite", IDS_SETTINGS_SITE_SETTINGS_INCOGNITO_EMBEDDED}, |
| 1773 {"siteSettingsSiteDetails", IDS_SETTINGS_SITE_DETAILS}, | 1774 {"siteSettingsSiteDetails", IDS_SETTINGS_SITE_DETAILS}, |
| 1774 {"noSitesAdded", IDS_SETTINGS_SITE_NO_SITES_ADDED}, | 1775 {"noSitesAdded", IDS_SETTINGS_SITE_NO_SITES_ADDED}, |
| 1776 {"siteSettingsSubresourceFilter", IDS_SUBRESOURCE_FILTER_HEADER}, |
| 1777 {"siteSettingsSubresourceFilterAllow", IDS_SUBRESOURCE_FILTER_ALLOW_RADIO}, |
| 1778 {"siteSettingsSubresourceFilterBlock", IDS_SUBRESOURCE_FILTER_BLOCK_RADIO}, |
| 1775 }; | 1779 }; |
| 1776 AddLocalizedStringsBulk(html_source, localized_strings, | 1780 AddLocalizedStringsBulk(html_source, localized_strings, |
| 1777 arraysize(localized_strings)); | 1781 arraysize(localized_strings)); |
| 1778 | 1782 |
| 1779 html_source->AddBoolean("enableSiteSettings", | 1783 html_source->AddBoolean("enableSiteSettings", |
| 1780 base::CommandLine::ForCurrentProcess()->HasSwitch( | 1784 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1781 switches::kEnableSiteSettings)); | 1785 switches::kEnableSiteSettings)); |
| 1786 html_source->AddBoolean( |
| 1787 "enableSafeBrowsingSubresourceFilter", |
| 1788 base::FeatureList::IsEnabled( |
| 1789 subresource_filter::kSafeBrowsingSubresourceFilterContentSetting)); |
| 1782 | 1790 |
| 1783 if (PluginUtils::ShouldPreferHtmlOverPlugins( | 1791 if (PluginUtils::ShouldPreferHtmlOverPlugins( |
| 1784 HostContentSettingsMapFactory::GetForProfile(profile))) { | 1792 HostContentSettingsMapFactory::GetForProfile(profile))) { |
| 1785 LocalizedString flash_strings[] = { | 1793 LocalizedString flash_strings[] = { |
| 1786 {"siteSettingsFlashAskBefore", | 1794 {"siteSettingsFlashAskBefore", |
| 1787 IDS_SETTINGS_SITE_SETTINGS_FLASH_ASK_BEFORE_RUNNING}, | 1795 IDS_SETTINGS_SITE_SETTINGS_FLASH_ASK_BEFORE_RUNNING}, |
| 1788 {"siteSettingsFlashAskBeforeSubtitle", | 1796 {"siteSettingsFlashAskBeforeSubtitle", |
| 1789 IDS_SETTINGS_SITE_SETTINGS_FLASH_ASK_BEFORE_RUNNING_SUBTITLE}, | 1797 IDS_SETTINGS_SITE_SETTINGS_FLASH_ASK_BEFORE_RUNNING_SUBTITLE}, |
| 1790 }; | 1798 }; |
| 1791 AddLocalizedStringsBulk(html_source, flash_strings, | 1799 AddLocalizedStringsBulk(html_source, flash_strings, |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1984 | 1992 |
| 1985 #if defined(OS_CHROMEOS) | 1993 #if defined(OS_CHROMEOS) |
| 1986 chromeos::network_element::AddLocalizedStrings(html_source); | 1994 chromeos::network_element::AddLocalizedStrings(html_source); |
| 1987 #endif | 1995 #endif |
| 1988 policy_indicator::AddLocalizedStrings(html_source); | 1996 policy_indicator::AddLocalizedStrings(html_source); |
| 1989 | 1997 |
| 1990 html_source->SetJsonPath(kLocalizedStringsFile); | 1998 html_source->SetJsonPath(kLocalizedStringsFile); |
| 1991 } | 1999 } |
| 1992 | 2000 |
| 1993 } // namespace settings | 2001 } // namespace settings |
| OLD | NEW |