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

Side by Side Diff: components/autofill/core/browser/autofill_metrics.cc

Issue 2434543003: [Autofill] Separate Autofill.CreditCardInfoBar into .Local and .Server (Closed)
Patch Set: Add base=true value to histogram Created 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/autofill/core/browser/autofill_metrics.h" 5 #include "components/autofill/core/browser/autofill_metrics.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 251
252 // static 252 // static
253 void AutofillMetrics::LogCardUploadDecisionMetric( 253 void AutofillMetrics::LogCardUploadDecisionMetric(
254 CardUploadDecisionMetric metric) { 254 CardUploadDecisionMetric metric) {
255 DCHECK_LT(metric, NUM_CARD_UPLOAD_DECISION_METRICS); 255 DCHECK_LT(metric, NUM_CARD_UPLOAD_DECISION_METRICS);
256 UMA_HISTOGRAM_ENUMERATION("Autofill.CardUploadDecisionExpanded", metric, 256 UMA_HISTOGRAM_ENUMERATION("Autofill.CardUploadDecisionExpanded", metric,
257 NUM_CARD_UPLOAD_DECISION_METRICS); 257 NUM_CARD_UPLOAD_DECISION_METRICS);
258 } 258 }
259 259
260 // static 260 // static
261 void AutofillMetrics::LogCreditCardInfoBarMetric(InfoBarMetric metric) { 261 void AutofillMetrics::LogCreditCardInfoBarMetric(InfoBarMetric metric,
262 bool is_uploading) {
262 DCHECK_LT(metric, NUM_INFO_BAR_METRICS); 263 DCHECK_LT(metric, NUM_INFO_BAR_METRICS);
263 UMA_HISTOGRAM_ENUMERATION("Autofill.CreditCardInfoBar", metric, 264 if (is_uploading) {
264 NUM_INFO_BAR_METRICS); 265 UMA_HISTOGRAM_ENUMERATION("Autofill.CreditCardInfoBar.Server", metric,
266 NUM_INFO_BAR_METRICS);
267 } else {
268 UMA_HISTOGRAM_ENUMERATION("Autofill.CreditCardInfoBar.Local", metric,
269 NUM_INFO_BAR_METRICS);
270 }
265 } 271 }
266 272
267 // static 273 // static
268 void AutofillMetrics::LogCreditCardFillingInfoBarMetric(InfoBarMetric metric) { 274 void AutofillMetrics::LogCreditCardFillingInfoBarMetric(InfoBarMetric metric) {
269 DCHECK_LT(metric, NUM_INFO_BAR_METRICS); 275 DCHECK_LT(metric, NUM_INFO_BAR_METRICS);
270 UMA_HISTOGRAM_ENUMERATION("Autofill.CreditCardFillingInfoBar", metric, 276 UMA_HISTOGRAM_ENUMERATION("Autofill.CreditCardFillingInfoBar", metric,
271 NUM_INFO_BAR_METRICS); 277 NUM_INFO_BAR_METRICS);
272 } 278 }
273 279
274 // static 280 // static
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 else if (is_server_data_available_ && !is_local_data_available_) 850 else if (is_server_data_available_ && !is_local_data_available_)
845 name += ".WithOnlyServerData"; 851 name += ".WithOnlyServerData";
846 else if (!is_server_data_available_ && is_local_data_available_) 852 else if (!is_server_data_available_ && is_local_data_available_)
847 name += ".WithOnlyLocalData"; 853 name += ".WithOnlyLocalData";
848 else 854 else
849 name += ".WithBothServerAndLocalData"; 855 name += ".WithBothServerAndLocalData";
850 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS); 856 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS);
851 } 857 }
852 858
853 } // namespace autofill 859 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698