| 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/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 case PermissionStatusSource::MULTIPLE_IGNORES: | 335 case PermissionStatusSource::MULTIPLE_IGNORES: |
| 336 PermissionUmaUtil::RecordEmbargoPromptSuppression( | 336 PermissionUmaUtil::RecordEmbargoPromptSuppression( |
| 337 PermissionEmbargoStatus::REPEATED_IGNORES); | 337 PermissionEmbargoStatus::REPEATED_IGNORES); |
| 338 break; | 338 break; |
| 339 case PermissionStatusSource::SAFE_BROWSING_BLACKLIST: | 339 case PermissionStatusSource::SAFE_BROWSING_BLACKLIST: |
| 340 PermissionUmaUtil::RecordEmbargoPromptSuppression( | 340 PermissionUmaUtil::RecordEmbargoPromptSuppression( |
| 341 PermissionEmbargoStatus::PERMISSIONS_BLACKLISTING); | 341 PermissionEmbargoStatus::PERMISSIONS_BLACKLISTING); |
| 342 break; | 342 break; |
| 343 case PermissionStatusSource::UNSPECIFIED: | 343 case PermissionStatusSource::UNSPECIFIED: |
| 344 case PermissionStatusSource::KILL_SWITCH: | 344 case PermissionStatusSource::KILL_SWITCH: |
| 345 case PermissionStatusSource::INSECURE_ORIGIN: |
| 346 case PermissionStatusSource::ENTERPRISE_POLICY: |
| 347 case PermissionStatusSource::EXTENSION: |
| 345 // The permission wasn't under embargo, so don't record anything. We may | 348 // The permission wasn't under embargo, so don't record anything. We may |
| 346 // embargo it later. | 349 // embargo it later. |
| 347 break; | 350 break; |
| 348 } | 351 } |
| 349 } | 352 } |
| 350 | 353 |
| 351 void PermissionUmaUtil::RecordEmbargoStatus( | 354 void PermissionUmaUtil::RecordEmbargoStatus( |
| 352 PermissionEmbargoStatus embargo_status) { | 355 PermissionEmbargoStatus embargo_status) { |
| 353 UMA_HISTOGRAM_ENUMERATION("Permissions.AutoBlocker.EmbargoStatus", | 356 UMA_HISTOGRAM_ENUMERATION("Permissions.AutoBlocker.EmbargoStatus", |
| 354 embargo_status, PermissionEmbargoStatus::NUM); | 357 embargo_status, PermissionEmbargoStatus::NUM); |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 } | 709 } |
| 707 | 710 |
| 708 if (accepted) { | 711 if (accepted) { |
| 709 RecordPermissionPromptAccepted(permission_prompt_type, | 712 RecordPermissionPromptAccepted(permission_prompt_type, |
| 710 permission_gesture_type); | 713 permission_gesture_type); |
| 711 } else { | 714 } else { |
| 712 RecordPermissionPromptDenied(permission_prompt_type, | 715 RecordPermissionPromptDenied(permission_prompt_type, |
| 713 permission_gesture_type); | 716 permission_gesture_type); |
| 714 } | 717 } |
| 715 } | 718 } |
| OLD | NEW |