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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
279 void PermissionUmaUtil::PermissionPromptShown( | 279 void PermissionUmaUtil::PermissionPromptShown( |
280 const std::vector<PermissionBubbleRequest*>& requests) { | 280 const std::vector<PermissionBubbleRequest*>& requests) { |
281 DCHECK(!requests.empty()); | 281 DCHECK(!requests.empty()); |
282 PermissionBubbleType permission_prompt_type = PermissionBubbleType::MULTIPLE; | 282 PermissionBubbleType permission_prompt_type = PermissionBubbleType::MULTIPLE; |
283 if (requests.size() == 1) | 283 if (requests.size() == 1) |
284 permission_prompt_type = requests[0]->GetPermissionBubbleType(); | 284 permission_prompt_type = requests[0]->GetPermissionBubbleType(); |
285 UMA_HISTOGRAM_ENUMERATION( | 285 UMA_HISTOGRAM_ENUMERATION( |
286 "Permissions.Prompt.Shown", | 286 "Permissions.Prompt.Shown", |
287 static_cast<base::HistogramBase::Sample>(permission_prompt_type), | 287 static_cast<base::HistogramBase::Sample>(permission_prompt_type), |
288 static_cast<base::HistogramBase::Sample>(PermissionBubbleType::NUM)); | 288 static_cast<base::HistogramBase::Sample>(PermissionBubbleType::NUM)); |
289 | |
290 UMA_HISTOGRAM_ENUMERATION( | |
291 "Permissions.Prompt.RequestsPerPrompt", | |
292 static_cast<base::HistogramBase::Sample>(requests.size()), | |
293 static_cast<base::HistogramBase::Sample>(10)); | |
294 | |
295 if (requests.size() > 1) { | |
296 for (const auto* request : requests) { | |
297 UMA_HISTOGRAM_ENUMERATION( | |
298 "Permissions.Prompt.MergedBubbleTypes", | |
299 static_cast<base::HistogramBase::Sample>( | |
300 request->GetPermissionBubbleType()), | |
felt
2016/04/28 23:55:19
i am wondering, how do you plan to interpret this?
benwells
2016/04/29 00:07:51
That's right. We'd know that camera, mic and geo o
felt
2016/04/29 00:19:43
if you are looking for specific combinations (like
| |
301 static_cast<base::HistogramBase::Sample>(PermissionBubbleType::NUM)); | |
302 } | |
303 } | |
289 } | 304 } |
OLD | NEW |