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 <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "content/public/browser/web_ui.h" | 42 #include "content/public/browser/web_ui.h" |
43 #include "content/public/common/content_switches.h" | 43 #include "content/public/common/content_switches.h" |
44 #include "content/public/common/page_zoom.h" | 44 #include "content/public/common/page_zoom.h" |
45 #include "extensions/common/extension_set.h" | 45 #include "extensions/common/extension_set.h" |
46 #include "extensions/common/permissions/api_permission.h" | 46 #include "extensions/common/permissions/api_permission.h" |
47 #include "grit/generated_resources.h" | 47 #include "grit/generated_resources.h" |
48 #include "grit/locale_settings.h" | 48 #include "grit/locale_settings.h" |
49 #include "ui/base/l10n/l10n_util.h" | 49 #include "ui/base/l10n/l10n_util.h" |
50 | 50 |
51 #if defined(OS_CHROMEOS) | 51 #if defined(OS_CHROMEOS) |
52 #include "chrome/browser/chromeos/login/user_manager.h" | 52 #include "chrome/browser/chromeos/login/users/user_manager.h" |
53 #endif | 53 #endif |
54 | 54 |
55 using base::UserMetricsAction; | 55 using base::UserMetricsAction; |
56 using extensions::APIPermission; | 56 using extensions::APIPermission; |
57 | 57 |
58 namespace { | 58 namespace { |
59 | 59 |
60 struct ContentSettingsTypeNameEntry { | 60 struct ContentSettingsTypeNameEntry { |
61 ContentSettingsType type; | 61 ContentSettingsType type; |
62 const char* name; | 62 const char* name; |
(...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1564 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { | 1564 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { |
1565 PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs(); | 1565 PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs(); |
1566 // Exceptions apply only when the feature is enabled. | 1566 // Exceptions apply only when the feature is enabled. |
1567 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); | 1567 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); |
1568 web_ui()->CallJavascriptFunction( | 1568 web_ui()->CallJavascriptFunction( |
1569 "ContentSettings.enableProtectedContentExceptions", | 1569 "ContentSettings.enableProtectedContentExceptions", |
1570 base::FundamentalValue(enable_exceptions)); | 1570 base::FundamentalValue(enable_exceptions)); |
1571 } | 1571 } |
1572 | 1572 |
1573 } // namespace options | 1573 } // namespace options |
OLD | NEW |