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 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1359 UserMetricsAction("Options_DefaultMediaStreamMicSettingChanged")); | 1359 UserMetricsAction("Options_DefaultMediaStreamMicSettingChanged")); |
1360 break; | 1360 break; |
1361 case CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS: | 1361 case CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS: |
1362 content::RecordAction( | 1362 content::RecordAction( |
1363 UserMetricsAction("Options_DefaultMultipleAutomaticDLSettingChange")); | 1363 UserMetricsAction("Options_DefaultMultipleAutomaticDLSettingChange")); |
1364 break; | 1364 break; |
1365 case CONTENT_SETTINGS_TYPE_MIDI_SYSEX: | 1365 case CONTENT_SETTINGS_TYPE_MIDI_SYSEX: |
1366 content::RecordAction( | 1366 content::RecordAction( |
1367 UserMetricsAction("Options_DefaultMIDISysExSettingChanged")); | 1367 UserMetricsAction("Options_DefaultMIDISysExSettingChanged")); |
1368 break; | 1368 break; |
| 1369 case CONTENT_SETTINGS_TYPE_PUSH_MESSAGING: |
| 1370 content::RecordAction( |
| 1371 UserMetricsAction("Options_DefaultPushMessagingSettingChanged")); |
| 1372 break; |
1369 default: | 1373 default: |
1370 break; | 1374 break; |
1371 } | 1375 } |
1372 } | 1376 } |
1373 | 1377 |
1374 void ContentSettingsHandler::RemoveException(const base::ListValue* args) { | 1378 void ContentSettingsHandler::RemoveException(const base::ListValue* args) { |
1375 std::string type_string; | 1379 std::string type_string; |
1376 CHECK(args->GetString(0, &type_string)); | 1380 CHECK(args->GetString(0, &type_string)); |
1377 | 1381 |
1378 // Zoom levels are no actual content type so we need to handle them | 1382 // Zoom levels are no actual content type so we need to handle them |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1566 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { | 1570 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { |
1567 PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs(); | 1571 PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs(); |
1568 // Exceptions apply only when the feature is enabled. | 1572 // Exceptions apply only when the feature is enabled. |
1569 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); | 1573 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); |
1570 web_ui()->CallJavascriptFunction( | 1574 web_ui()->CallJavascriptFunction( |
1571 "ContentSettings.enableProtectedContentExceptions", | 1575 "ContentSettings.enableProtectedContentExceptions", |
1572 base::FundamentalValue(enable_exceptions)); | 1576 base::FundamentalValue(enable_exceptions)); |
1573 } | 1577 } |
1574 | 1578 |
1575 } // namespace options | 1579 } // namespace options |
OLD | NEW |