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_context_uma_util.h" | 5 #include "chrome/browser/permissions/permission_context_uma_util.h" |
6 | 6 |
7 #include "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/permissions/permission_manager.h" | 10 #include "chrome/browser/permissions/permission_manager.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 case PermissionType::PROTECTED_MEDIA_IDENTIFIER: | 202 case PermissionType::PROTECTED_MEDIA_IDENTIFIER: |
203 return "ProtectedMediaIdentifier"; | 203 return "ProtectedMediaIdentifier"; |
204 case PermissionType::DURABLE_STORAGE: | 204 case PermissionType::DURABLE_STORAGE: |
205 return "DurableStorage"; | 205 return "DurableStorage"; |
206 case PermissionType::MIDI: | 206 case PermissionType::MIDI: |
207 return "Midi"; | 207 return "Midi"; |
208 case PermissionType::AUDIO_CAPTURE: | 208 case PermissionType::AUDIO_CAPTURE: |
209 return "AudioRecording"; | 209 return "AudioRecording"; |
210 case PermissionType::VIDEO_CAPTURE: | 210 case PermissionType::VIDEO_CAPTURE: |
211 return "VideoRecording"; | 211 return "VideoRecording"; |
| 212 case PermissionType::USB: |
| 213 return "Usb"; |
212 case PermissionType::NUM: | 214 case PermissionType::NUM: |
213 break; | 215 break; |
214 } | 216 } |
215 NOTREACHED(); | 217 NOTREACHED(); |
216 return std::string(); | 218 return std::string(); |
217 } | 219 } |
218 | 220 |
219 void RecordPermissionRequest(ContentSettingsType permission, | 221 void RecordPermissionRequest(ContentSettingsType permission, |
220 const GURL& requesting_origin, | 222 const GURL& requesting_origin, |
221 const GURL& embedding_origin, | 223 const GURL& embedding_origin, |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 | 323 |
322 void PermissionContextUmaUtil::PermissionDismissed( | 324 void PermissionContextUmaUtil::PermissionDismissed( |
323 ContentSettingsType permission, const GURL& requesting_origin) { | 325 ContentSettingsType permission, const GURL& requesting_origin) { |
324 RecordPermissionAction(permission, DISMISSED, requesting_origin); | 326 RecordPermissionAction(permission, DISMISSED, requesting_origin); |
325 } | 327 } |
326 | 328 |
327 void PermissionContextUmaUtil::PermissionIgnored( | 329 void PermissionContextUmaUtil::PermissionIgnored( |
328 ContentSettingsType permission, const GURL& requesting_origin) { | 330 ContentSettingsType permission, const GURL& requesting_origin) { |
329 RecordPermissionAction(permission, IGNORED, requesting_origin); | 331 RecordPermissionAction(permission, IGNORED, requesting_origin); |
330 } | 332 } |
OLD | NEW |