| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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/banners/app_banner_metrics.h" | 5 #include "chrome/browser/banners/app_banner_metrics.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
| 8 #include "base/metrics/sparse_histogram.h" | 8 #include "base/metrics/sparse_histogram.h" |
| 9 #include "chrome/browser/installable/installable_logging.h" | 9 #include "chrome/browser/installable/installable_logging.h" |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 void TrackBeforeInstallEvent(int event) { | 55 void TrackBeforeInstallEvent(int event) { |
| 56 DCHECK_LT(BEFORE_INSTALL_EVENT_MIN, event); | 56 DCHECK_LT(BEFORE_INSTALL_EVENT_MIN, event); |
| 57 DCHECK_LT(event, BEFORE_INSTALL_EVENT_MAX); | 57 DCHECK_LT(event, BEFORE_INSTALL_EVENT_MAX); |
| 58 UMA_HISTOGRAM_SPARSE_SLOWLY(kBeforeInstallEventHistogram, event); | 58 UMA_HISTOGRAM_SPARSE_SLOWLY(kBeforeInstallEventHistogram, event); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void TrackInstallableStatusCode(InstallableStatusCode code) { | 61 void TrackInstallableStatusCode(InstallableStatusCode code) { |
| 62 DCHECK_LE(NO_ERROR_DETECTED, code); | 62 DCHECK_LE(NO_ERROR_DETECTED, code); |
| 63 DCHECK_LT(code, MAX_ERROR_CODE); | 63 DCHECK_LT(code, MAX_ERROR_CODE); |
| 64 UMA_HISTOGRAM_SPARSE_SLOWLY(kInstallableStatusCodeHistogram, code); | 64 if (code != IN_INCOGNITO) { |
| 65 // Do not log that we are in incognito to UMA. |
| 66 UMA_HISTOGRAM_SPARSE_SLOWLY(kInstallableStatusCodeHistogram, code); |
| 67 } |
| 65 } | 68 } |
| 66 | 69 |
| 67 } // namespace banners | 70 } // namespace banners |
| OLD | NEW |