| 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 permission == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC || | 362 permission == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC || |
| 363 permission == CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA) { | 363 permission == CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA) { |
| 364 // An unknown gesture type is passed in since gesture type is only | 364 // An unknown gesture type is passed in since gesture type is only |
| 365 // applicable in prompt UIs where revocations are not possible. | 365 // applicable in prompt UIs where revocations are not possible. |
| 366 RecordPermissionAction(permission, REVOKED, source_ui, | 366 RecordPermissionAction(permission, REVOKED, source_ui, |
| 367 PermissionRequestGestureType::UNKNOWN, | 367 PermissionRequestGestureType::UNKNOWN, |
| 368 revoked_origin, profile); | 368 revoked_origin, profile); |
| 369 } | 369 } |
| 370 } | 370 } |
| 371 | 371 |
| 372 void PermissionUmaUtil::RecordPermissionEmbargoStatus( | 372 void PermissionUmaUtil::RecordEmbargoPromptSuppression( |
| 373 PermissionEmbargoStatus embargo_status) { |
| 374 UMA_HISTOGRAM_ENUMERATION("Permissions.AutoBlocker.EmbargoPromptSuppression", |
| 375 embargo_status, |
| 376 PermissionEmbargoStatus::STATUS_NUM); |
| 377 } |
| 378 |
| 379 void PermissionUmaUtil::RecordEmbargoStatus( |
| 373 PermissionEmbargoStatus embargo_status) { | 380 PermissionEmbargoStatus embargo_status) { |
| 374 UMA_HISTOGRAM_ENUMERATION("Permissions.AutoBlocker.EmbargoStatus", | 381 UMA_HISTOGRAM_ENUMERATION("Permissions.AutoBlocker.EmbargoStatus", |
| 375 embargo_status, | 382 embargo_status, |
| 376 PermissionEmbargoStatus::STATUS_NUM); | 383 PermissionEmbargoStatus::STATUS_NUM); |
| 377 } | 384 } |
| 378 | 385 |
| 379 void PermissionUmaUtil::RecordSafeBrowsingResponse( | 386 void PermissionUmaUtil::RecordSafeBrowsingResponse( |
| 380 base::TimeDelta response_time, | 387 base::TimeDelta response_time, |
| 381 SafeBrowsingResponse response) { | 388 SafeBrowsingResponse response) { |
| 382 UMA_HISTOGRAM_TIMES("Permissions.AutoBlocker.SafeBrowsingResponseTime", | 389 UMA_HISTOGRAM_TIMES("Permissions.AutoBlocker.SafeBrowsingResponseTime", |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 if (!deprecated_metric.empty() && rappor_service) { | 743 if (!deprecated_metric.empty() && rappor_service) { |
| 737 rappor::SampleDomainAndRegistryFromGURL(rappor_service, deprecated_metric, | 744 rappor::SampleDomainAndRegistryFromGURL(rappor_service, deprecated_metric, |
| 738 requesting_origin); | 745 requesting_origin); |
| 739 | 746 |
| 740 std::string rappor_metric = deprecated_metric + "2"; | 747 std::string rappor_metric = deprecated_metric + "2"; |
| 741 rappor_service->RecordSampleString( | 748 rappor_service->RecordSampleString( |
| 742 rappor_metric, rappor::LOW_FREQUENCY_ETLD_PLUS_ONE_RAPPOR_TYPE, | 749 rappor_metric, rappor::LOW_FREQUENCY_ETLD_PLUS_ONE_RAPPOR_TYPE, |
| 743 rappor::GetDomainAndRegistrySampleFromGURL(requesting_origin)); | 750 rappor::GetDomainAndRegistrySampleFromGURL(requesting_origin)); |
| 744 } | 751 } |
| 745 } | 752 } |
| OLD | NEW |