Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: chrome/browser/permissions/permission_uma_util.cc

Issue 2690543004: Add UMA for recording embargo reasons and autoblocker interactions. (Closed)
Patch Set: Address comment Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 permission == PermissionType::AUDIO_CAPTURE || 351 permission == PermissionType::AUDIO_CAPTURE ||
352 permission == PermissionType::VIDEO_CAPTURE) { 352 permission == PermissionType::VIDEO_CAPTURE) {
353 // An unknown gesture type is passed in since gesture type is only 353 // An unknown gesture type is passed in since gesture type is only
354 // applicable in prompt UIs where revocations are not possible. 354 // applicable in prompt UIs where revocations are not possible.
355 RecordPermissionAction(permission, REVOKED, source_ui, 355 RecordPermissionAction(permission, REVOKED, source_ui,
356 PermissionRequestGestureType::UNKNOWN, 356 PermissionRequestGestureType::UNKNOWN,
357 revoked_origin, profile); 357 revoked_origin, profile);
358 } 358 }
359 } 359 }
360 360
361 void PermissionUmaUtil::RecordPermissionEmbargoStatus(
362 PermissionEmbargoStatus embargo_status) {
363 UMA_HISTOGRAM_ENUMERATION("Permissions.AutoBlocker.EmbargoStatus",
364 embargo_status,
365 PermissionEmbargoStatus::STATUS_NUM);
366 }
367
361 void PermissionUmaUtil::RecordSafeBrowsingResponse( 368 void PermissionUmaUtil::RecordSafeBrowsingResponse(
362 base::TimeDelta response_time, 369 base::TimeDelta response_time,
363 SafeBrowsingResponse response) { 370 SafeBrowsingResponse response) {
364 UMA_HISTOGRAM_TIMES("Permissions.AutoBlocker.SafeBrowsingResponseTime", 371 UMA_HISTOGRAM_TIMES("Permissions.AutoBlocker.SafeBrowsingResponseTime",
365 response_time); 372 response_time);
366 UMA_HISTOGRAM_ENUMERATION("Permissions.AutoBlocker.SafeBrowsingResponse", 373 UMA_HISTOGRAM_ENUMERATION("Permissions.AutoBlocker.SafeBrowsingResponse",
367 response, SafeBrowsingResponse::RESPONSE_NUM); 374 response, SafeBrowsingResponse::RESPONSE_NUM);
368 } 375 }
369 376
370 void PermissionUmaUtil::PermissionPromptShown( 377 void PermissionUmaUtil::PermissionPromptShown(
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 if (!deprecated_metric.empty() && rappor_service) { 733 if (!deprecated_metric.empty() && rappor_service) {
727 rappor::SampleDomainAndRegistryFromGURL(rappor_service, deprecated_metric, 734 rappor::SampleDomainAndRegistryFromGURL(rappor_service, deprecated_metric,
728 requesting_origin); 735 requesting_origin);
729 736
730 std::string rappor_metric = deprecated_metric + "2"; 737 std::string rappor_metric = deprecated_metric + "2";
731 rappor_service->RecordSampleString( 738 rappor_service->RecordSampleString(
732 rappor_metric, rappor::LOW_FREQUENCY_ETLD_PLUS_ONE_RAPPOR_TYPE, 739 rappor_metric, rappor::LOW_FREQUENCY_ETLD_PLUS_ONE_RAPPOR_TYPE,
733 rappor::GetDomainAndRegistrySampleFromGURL(requesting_origin)); 740 rappor::GetDomainAndRegistrySampleFromGURL(requesting_origin));
734 } 741 }
735 } 742 }
OLDNEW
« no previous file with comments | « chrome/browser/permissions/permission_uma_util.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698