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

Side by Side Diff: components/security_interstitials/core/metrics_helper.cc

Issue 1365733005: Split captive portal metrics out of SSLErrorClassification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compiler error fix possibly for realsies Created 5 years, 2 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 "components/security_interstitials/core/metrics_helper.h" 5 #include "components/security_interstitials/core/metrics_helper.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "components/history/core/browser/history_service.h" 8 #include "components/history/core/browser/history_service.h"
9 #include "components/rappor/rappor_service.h" 9 #include "components/rappor/rappor_service.h"
10 #include "components/rappor/rappor_utils.h" 10 #include "components/rappor/rappor_utils.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 "interstitial." + settings_.metric_prefix + ".interaction"); 127 "interstitial." + settings_.metric_prefix + ".interaction");
128 128
129 RecordSingleInteractionToMetrics(interaction, histogram_name); 129 RecordSingleInteractionToMetrics(interaction, histogram_name);
130 if (!settings_.extra_suffix.empty()) { 130 if (!settings_.extra_suffix.empty()) {
131 RecordSingleInteractionToMetrics( 131 RecordSingleInteractionToMetrics(
132 interaction, histogram_name + "." + settings_.extra_suffix); 132 interaction, histogram_name + "." + settings_.extra_suffix);
133 } 133 }
134 RecordExtraUserInteractionMetrics(interaction); 134 RecordExtraUserInteractionMetrics(interaction);
135 } 135 }
136 136
137 void MetricsHelper::RecordShutdownMetrics() {
138 RecordExtraShutdownMetrics();
139 }
140
137 int MetricsHelper::NumVisits() { 141 int MetricsHelper::NumVisits() {
138 return num_visits_; 142 return num_visits_;
139 } 143 }
140 144
141 void MetricsHelper::OnGotHistoryCount(bool success, 145 void MetricsHelper::OnGotHistoryCount(bool success,
142 int num_visits, 146 int num_visits,
143 base::Time /*first_visit*/) { 147 base::Time /*first_visit*/) {
144 if (success) 148 if (success)
145 num_visits_ = num_visits; 149 num_visits_ = num_visits;
146 } 150 }
147 151
148 } // namespace security_interstitials 152 } // namespace security_interstitials
OLDNEW
« no previous file with comments | « components/security_interstitials/core/metrics_helper.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698