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

Side by Side Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 430813004: Componentize content_settings_provider.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 6 years, 4 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 (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 <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/bind_helpers.h" 12 #include "base/bind_helpers.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/prefs/pref_service.h" 14 #include "base/prefs/pref_service.h"
15 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
16 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
17 #include "base/values.h" 17 #include "base/values.h"
18 #include "chrome/browser/browser_process.h" 18 #include "chrome/browser/browser_process.h"
19 #include "chrome/browser/chrome_notification_types.h" 19 #include "chrome/browser/chrome_notification_types.h"
20 #include "chrome/browser/content_settings/content_settings_details.h" 20 #include "chrome/browser/content_settings/content_settings_details.h"
21 #include "chrome/browser/content_settings/content_settings_provider.h"
22 #include "chrome/browser/content_settings/content_settings_utils.h" 21 #include "chrome/browser/content_settings/content_settings_utils.h"
23 #include "chrome/browser/content_settings/host_content_settings_map.h" 22 #include "chrome/browser/content_settings/host_content_settings_map.h"
24 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 23 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
25 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" 24 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
26 #include "chrome/browser/extensions/extension_special_storage_policy.h" 25 #include "chrome/browser/extensions/extension_special_storage_policy.h"
27 #include "chrome/browser/notifications/desktop_notification_profile_util.h" 26 #include "chrome/browser/notifications/desktop_notification_profile_util.h"
28 #include "chrome/browser/profiles/profile.h" 27 #include "chrome/browser/profiles/profile.h"
29 #include "chrome/browser/ui/browser_list.h" 28 #include "chrome/browser/ui/browser_list.h"
30 #include "chrome/common/chrome_switches.h" 29 #include "chrome/common/chrome_switches.h"
31 #include "chrome/common/content_settings.h" 30 #include "chrome/common/content_settings.h"
(...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { 1566 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() {
1568 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); 1567 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui()));
1569 // Exceptions apply only when the feature is enabled. 1568 // Exceptions apply only when the feature is enabled.
1570 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); 1569 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM);
1571 web_ui()->CallJavascriptFunction( 1570 web_ui()->CallJavascriptFunction(
1572 "ContentSettings.enableProtectedContentExceptions", 1571 "ContentSettings.enableProtectedContentExceptions",
1573 base::FundamentalValue(enable_exceptions)); 1572 base::FundamentalValue(enable_exceptions));
1574 } 1573 }
1575 1574
1576 } // namespace options 1575 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/website_settings/website_settings_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698