Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Side by Side Diff: chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc

Issue 2682293002: Add desktop UI for the subresource filter content setting. (Closed)
Patch Set: cs_ui Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after
1791 {"handlerIsDefault", IDS_SETTINGS_SITE_SETTINGS_HANDLER_IS_DEFAULT}, 1792 {"handlerIsDefault", IDS_SETTINGS_SITE_SETTINGS_HANDLER_IS_DEFAULT},
1792 {"handlerSetDefault", IDS_SETTINGS_SITE_SETTINGS_HANDLER_SET_DEFAULT}, 1793 {"handlerSetDefault", IDS_SETTINGS_SITE_SETTINGS_HANDLER_SET_DEFAULT},
1793 {"handlerRemove", IDS_SETTINGS_SITE_SETTINGS_REMOVE}, 1794 {"handlerRemove", IDS_SETTINGS_SITE_SETTINGS_REMOVE},
1794 {"adobeFlashStorage", IDS_SETTINGS_SITE_SETTINGS_ADOBE_FLASH_SETTINGS}, 1795 {"adobeFlashStorage", IDS_SETTINGS_SITE_SETTINGS_ADOBE_FLASH_SETTINGS},
1795 {"learnMore", IDS_SETTINGS_SITE_SETTINGS_LEARN_MORE}, 1796 {"learnMore", IDS_SETTINGS_SITE_SETTINGS_LEARN_MORE},
1796 {"incognitoSite", IDS_SETTINGS_SITE_SETTINGS_INCOGNITO}, 1797 {"incognitoSite", IDS_SETTINGS_SITE_SETTINGS_INCOGNITO},
1797 {"incognitoSiteOnly", IDS_SETTINGS_SITE_SETTINGS_INCOGNITO_ONLY}, 1798 {"incognitoSiteOnly", IDS_SETTINGS_SITE_SETTINGS_INCOGNITO_ONLY},
1798 {"embeddedIncognitoSite", IDS_SETTINGS_SITE_SETTINGS_INCOGNITO_EMBEDDED}, 1799 {"embeddedIncognitoSite", IDS_SETTINGS_SITE_SETTINGS_INCOGNITO_EMBEDDED},
1799 {"siteSettingsSiteDetails", IDS_SETTINGS_SITE_DETAILS}, 1800 {"siteSettingsSiteDetails", IDS_SETTINGS_SITE_DETAILS},
1800 {"noSitesAdded", IDS_SETTINGS_SITE_NO_SITES_ADDED}, 1801 {"noSitesAdded", IDS_SETTINGS_SITE_NO_SITES_ADDED},
1802 {"siteSettingsSubresourceFilter", IDS_SUBRESOURCE_FILTER_HEADER},
1803 {"siteSettingsSubresourceFilterAllow", IDS_SUBRESOURCE_FILTER_ALLOW_RADIO},
1804 {"siteSettingsSubresourceFilterBlock", IDS_SUBRESOURCE_FILTER_BLOCK_RADIO},
1801 }; 1805 };
1802 AddLocalizedStringsBulk(html_source, localized_strings, 1806 AddLocalizedStringsBulk(html_source, localized_strings,
1803 arraysize(localized_strings)); 1807 arraysize(localized_strings));
1804 1808
1805 html_source->AddBoolean("enableSiteSettings", 1809 html_source->AddBoolean("enableSiteSettings",
1806 base::CommandLine::ForCurrentProcess()->HasSwitch( 1810 base::CommandLine::ForCurrentProcess()->HasSwitch(
1807 switches::kEnableSiteSettings)); 1811 switches::kEnableSiteSettings));
1812 html_source->AddBoolean(
1813 "enableSafeBrowsingSubresourceFilter",
1814 base::FeatureList::IsEnabled(
1815 subresource_filter::kSafeBrowsingSubresourceFilterExperimentalUI));
1808 1816
1809 if (PluginUtils::ShouldPreferHtmlOverPlugins( 1817 if (PluginUtils::ShouldPreferHtmlOverPlugins(
1810 HostContentSettingsMapFactory::GetForProfile(profile))) { 1818 HostContentSettingsMapFactory::GetForProfile(profile))) {
1811 LocalizedString flash_strings[] = { 1819 LocalizedString flash_strings[] = {
1812 {"siteSettingsFlashAskBefore", 1820 {"siteSettingsFlashAskBefore",
1813 IDS_SETTINGS_SITE_SETTINGS_FLASH_ASK_BEFORE_RUNNING}, 1821 IDS_SETTINGS_SITE_SETTINGS_FLASH_ASK_BEFORE_RUNNING},
1814 {"siteSettingsFlashAskBeforeSubtitle", 1822 {"siteSettingsFlashAskBeforeSubtitle",
1815 IDS_SETTINGS_SITE_SETTINGS_FLASH_ASK_BEFORE_RUNNING_SUBTITLE}, 1823 IDS_SETTINGS_SITE_SETTINGS_FLASH_ASK_BEFORE_RUNNING_SUBTITLE},
1816 }; 1824 };
1817 AddLocalizedStringsBulk(html_source, flash_strings, 1825 AddLocalizedStringsBulk(html_source, flash_strings,
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
2010 2018
2011 #if defined(OS_CHROMEOS) 2019 #if defined(OS_CHROMEOS)
2012 chromeos::network_element::AddLocalizedStrings(html_source); 2020 chromeos::network_element::AddLocalizedStrings(html_source);
2013 #endif 2021 #endif
2014 policy_indicator::AddLocalizedStrings(html_source); 2022 policy_indicator::AddLocalizedStrings(html_source);
2015 2023
2016 html_source->SetJsonPath(kLocalizedStringsFile); 2024 html_source->SetJsonPath(kLocalizedStringsFile);
2017 } 2025 }
2018 2026
2019 } // namespace settings 2027 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698