| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/options/content_settings_handler.h" | 5 #include "chrome/browser/ui/webui/options/content_settings_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <utility> | 10 #include <utility> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "base/bind_helpers.h" | 14 #include "base/bind_helpers.h" |
| 15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
| 16 #include "base/logging.h" | 16 #include "base/logging.h" |
| 17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/prefs/pref_service.h" | |
| 19 #include "base/stl_util.h" | 18 #include "base/stl_util.h" |
| 20 #include "base/strings/string_number_conversions.h" | 19 #include "base/strings/string_number_conversions.h" |
| 21 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
| 22 #include "base/values.h" | 21 #include "base/values.h" |
| 23 #include "build/build_config.h" | 22 #include "build/build_config.h" |
| 24 #include "chrome/browser/browser_process.h" | 23 #include "chrome/browser/browser_process.h" |
| 25 #include "chrome/browser/chrome_notification_types.h" | 24 #include "chrome/browser/chrome_notification_types.h" |
| 26 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 25 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 27 #include "chrome/browser/content_settings/web_site_settings_uma_util.h" | 26 #include "chrome/browser/content_settings/web_site_settings_uma_util.h" |
| 28 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 27 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 44 #include "chrome/grit/locale_settings.h" | 43 #include "chrome/grit/locale_settings.h" |
| 45 #include "components/content_settings/core/browser/content_settings_details.h" | 44 #include "components/content_settings/core/browser/content_settings_details.h" |
| 46 #include "components/content_settings/core/browser/content_settings_utils.h" | 45 #include "components/content_settings/core/browser/content_settings_utils.h" |
| 47 #include "components/content_settings/core/browser/host_content_settings_map.h" | 46 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 48 #include "components/content_settings/core/browser/plugins_field_trial.h" | 47 #include "components/content_settings/core/browser/plugins_field_trial.h" |
| 49 #include "components/content_settings/core/browser/website_settings_info.h" | 48 #include "components/content_settings/core/browser/website_settings_info.h" |
| 50 #include "components/content_settings/core/browser/website_settings_registry.h" | 49 #include "components/content_settings/core/browser/website_settings_registry.h" |
| 51 #include "components/content_settings/core/common/content_settings.h" | 50 #include "components/content_settings/core/common/content_settings.h" |
| 52 #include "components/content_settings/core/common/content_settings_pattern.h" | 51 #include "components/content_settings/core/common/content_settings_pattern.h" |
| 53 #include "components/google/core/browser/google_util.h" | 52 #include "components/google/core/browser/google_util.h" |
| 53 #include "components/prefs/pref_service.h" |
| 54 #include "components/signin/core/common/profile_management_switches.h" | 54 #include "components/signin/core/common/profile_management_switches.h" |
| 55 #include "components/user_prefs/user_prefs.h" | 55 #include "components/user_prefs/user_prefs.h" |
| 56 #include "content/public/browser/notification_service.h" | 56 #include "content/public/browser/notification_service.h" |
| 57 #include "content/public/browser/notification_source.h" | 57 #include "content/public/browser/notification_source.h" |
| 58 #include "content/public/browser/notification_types.h" | 58 #include "content/public/browser/notification_types.h" |
| 59 #include "content/public/browser/storage_partition.h" | 59 #include "content/public/browser/storage_partition.h" |
| 60 #include "content/public/browser/user_metrics.h" | 60 #include "content/public/browser/user_metrics.h" |
| 61 #include "content/public/browser/web_contents.h" | 61 #include "content/public/browser/web_contents.h" |
| 62 #include "content/public/browser/web_ui.h" | 62 #include "content/public/browser/web_ui.h" |
| 63 #include "content/public/common/content_switches.h" | 63 #include "content/public/common/content_switches.h" |
| (...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1846 | 1846 |
| 1847 // Exceptions apply only when the feature is enabled. | 1847 // Exceptions apply only when the feature is enabled. |
| 1848 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); | 1848 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); |
| 1849 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); | 1849 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); |
| 1850 web_ui()->CallJavascriptFunction( | 1850 web_ui()->CallJavascriptFunction( |
| 1851 "ContentSettings.enableProtectedContentExceptions", | 1851 "ContentSettings.enableProtectedContentExceptions", |
| 1852 base::FundamentalValue(enable_exceptions)); | 1852 base::FundamentalValue(enable_exceptions)); |
| 1853 } | 1853 } |
| 1854 | 1854 |
| 1855 } // namespace options | 1855 } // namespace options |
| OLD | NEW |