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

Side by Side Diff: chrome/browser/banners/app_banner_metrics.cc

Issue 2633603002: Disable app banners in incognito. (Closed)
Patch Set: Comment + rebase Created 3 years, 11 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 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
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
OLDNEW
« no previous file with comments | « chrome/browser/banners/app_banner_manager_browsertest.cc ('k') | chrome/browser/installable/installable_logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698