Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / chrome / browser / banners / app_banner_metrics.cc
blob57a7d0fb1591a7fa48e44b214d7438498913e2db
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/banners/app_banner_metrics.h"
7 #include "base/metrics/histogram.h"
9 namespace banners {
11 void TrackDismissEvent(int event) {
12 std::vector<int> codes;
13 for (int i = DISMISS_EVENT_MIN + 1; i < DISMISS_EVENT_MAX; ++i) {
14 codes.push_back(i);
16 DCHECK(std::find(codes.begin(), codes.end(), event) != codes.end());
17 UMA_HISTOGRAM_CUSTOM_ENUMERATION("AppBanners.DismissEvent", event, codes);
20 void TrackDisplayEvent(int event) {
21 std::vector<int> codes;
22 for (int i = DISPLAY_EVENT_MIN + 1; i < DISPLAY_EVENT_MAX; ++i) {
23 codes.push_back(i);
25 DCHECK(std::find(codes.begin(), codes.end(), event) != codes.end());
26 UMA_HISTOGRAM_CUSTOM_ENUMERATION("AppBanners.DisplayEvent", event, codes);
29 void TrackInstallEvent(int event) {
30 std::vector<int> codes;
31 for (int i = INSTALL_EVENT_MIN + 1; i < INSTALL_EVENT_MAX; ++i) {
32 codes.push_back(i);
34 DCHECK(std::find(codes.begin(), codes.end(), event) != codes.end());
35 UMA_HISTOGRAM_CUSTOM_ENUMERATION("AppBanners.InstallEvent", event, codes);
38 } // namespace banners