OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/permissions/permission_uma_util.h" | 5 #include "chrome/browser/permissions/permission_uma_util.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 // Media permissions are disabled on insecure origins, so there's no | 143 // Media permissions are disabled on insecure origins, so there's no |
144 // need to record metrics for secure/insecue. | 144 // need to record metrics for secure/insecue. |
145 UMA_HISTOGRAM_ENUMERATION("Permissions.Action.AudioCapture", action, | 145 UMA_HISTOGRAM_ENUMERATION("Permissions.Action.AudioCapture", action, |
146 PERMISSION_ACTION_NUM); | 146 PERMISSION_ACTION_NUM); |
147 break; | 147 break; |
148 case PermissionType::VIDEO_CAPTURE: | 148 case PermissionType::VIDEO_CAPTURE: |
149 UMA_HISTOGRAM_ENUMERATION("Permissions.Action.VideoCapture", action, | 149 UMA_HISTOGRAM_ENUMERATION("Permissions.Action.VideoCapture", action, |
150 PERMISSION_ACTION_NUM); | 150 PERMISSION_ACTION_NUM); |
151 break; | 151 break; |
152 case PermissionType::MIDI: | 152 case PermissionType::MIDI: |
| 153 case PermissionType::BLUETOOTH: |
153 case PermissionType::NUM: | 154 case PermissionType::NUM: |
154 NOTREACHED() << "PERMISSION " | 155 NOTREACHED() << "PERMISSION " |
155 << PermissionUtil::GetPermissionString(permission) | 156 << PermissionUtil::GetPermissionString(permission) |
156 << " not accounted for"; | 157 << " not accounted for"; |
157 } | 158 } |
158 | 159 |
159 // There are two sets of semi-redundant RAPPOR metrics being reported: | 160 // There are two sets of semi-redundant RAPPOR metrics being reported: |
160 // The soon-to-be-deprecated single dimensional ones, and the new | 161 // The soon-to-be-deprecated single dimensional ones, and the new |
161 // multi-dimensional ones. | 162 // multi-dimensional ones. |
162 rappor::RapporService* rappor_service = g_browser_process->rappor_service(); | 163 rappor::RapporService* rappor_service = g_browser_process->rappor_service(); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 const GURL& revoked_origin) { | 282 const GURL& revoked_origin) { |
282 // TODO(tsergeant): Expand metrics definitions for revocation to include all | 283 // TODO(tsergeant): Expand metrics definitions for revocation to include all |
283 // permissions. | 284 // permissions. |
284 if (permission == PermissionType::NOTIFICATIONS || | 285 if (permission == PermissionType::NOTIFICATIONS || |
285 permission == PermissionType::GEOLOCATION || | 286 permission == PermissionType::GEOLOCATION || |
286 permission == PermissionType::AUDIO_CAPTURE || | 287 permission == PermissionType::AUDIO_CAPTURE || |
287 permission == PermissionType::VIDEO_CAPTURE) { | 288 permission == PermissionType::VIDEO_CAPTURE) { |
288 RecordPermissionAction(permission, REVOKED, revoked_origin); | 289 RecordPermissionAction(permission, REVOKED, revoked_origin); |
289 } | 290 } |
290 } | 291 } |
OLD | NEW |