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

Unified Diff: components/autofill/core/browser/autofill_metrics.cc

Issue 23537014: rAc: Get rid of dialog type in rAc, there is only one type left now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/browser/autofill_metrics.cc
diff --git a/components/autofill/core/browser/autofill_metrics.cc b/components/autofill/core/browser/autofill_metrics.cc
index cc4a4e77352e73a2ce5a9f6a872e68857867b7c4..c08a395141cd181a88910cf3736453429bad1050 100644
--- a/components/autofill/core/browser/autofill_metrics.cc
+++ b/components/autofill/core/browser/autofill_metrics.cc
@@ -158,20 +158,6 @@ int GetFieldTypeGroupMetric(const ServerFieldType field_type,
return (group * num_possible_metrics) + metric;
}
-// Returns the histogram prefix to use for reporting metrics for |dialog_type|.
-std::string GetPrefixForDialogType(autofill::DialogType dialog_type) {
- switch (dialog_type) {
- case autofill::DIALOG_TYPE_AUTOCHECKOUT:
- return "Autocheckout";
-
- case autofill::DIALOG_TYPE_REQUEST_AUTOCOMPLETE:
- return "RequestAutocomplete";
- }
-
- NOTREACHED();
- return "UnknownDialogType";
-}
-
std::string WalletApiMetricToString(
AutofillMetrics::WalletApiCallMetric metric) {
switch (metric) {
@@ -331,47 +317,38 @@ void AutofillMetrics::LogCreditCardInfoBarMetric(InfoBarMetric metric) const {
}
void AutofillMetrics::LogDialogDismissalState(
- autofill::DialogType dialog_type,
DialogDismissalState state) const {
- std::string name = GetPrefixForDialogType(dialog_type) + ".DismissalState";
+ std::string name = "RequestAutocomplete.DismissalState";
LogUMAHistogramEnumeration(name, state, NUM_DIALOG_DISMISSAL_STATES);
Ilya Sherman 2013/09/03 20:57:05 nit: Please update this to use the regular UMA_HIS
Raman Kakilate 2013/09/03 21:50:31 Done.
}
void AutofillMetrics::LogDialogInitialUserState(
- autofill::DialogType dialog_type,
DialogInitialUserStateMetric user_type) const {
- std::string name = GetPrefixForDialogType(dialog_type) + ".InitialUserState";
+ std::string name = "RequestAutocomplete.InitialUserState";
LogUMAHistogramEnumeration(
name, user_type, NUM_DIALOG_INITIAL_USER_STATE_METRICS);
Ilya Sherman 2013/09/03 20:57:05 nit: Please update this to use the regular UMA_HIS
Raman Kakilate 2013/09/03 21:50:31 Done.
}
void AutofillMetrics::LogDialogLatencyToShow(
- autofill::DialogType dialog_type,
const base::TimeDelta& duration) const {
- std::string name =
- GetPrefixForDialogType(dialog_type) + ".UiLatencyToShow";
+ std::string name = "RequestAutocomplete.UiLatencyToShow";
LogUMAHistogramTimes(name, duration);
Ilya Sherman 2013/09/03 20:57:05 nit: Please update this to use the regular UMA_HIS
Raman Kakilate 2013/09/03 21:50:31 Done.
}
-void AutofillMetrics::LogDialogPopupEvent(autofill::DialogType dialog_type,
- DialogPopupEvent event) const {
- std::string name = GetPrefixForDialogType(dialog_type) + ".PopupInDialog";
+void AutofillMetrics::LogDialogPopupEvent(DialogPopupEvent event) const {
+ std::string name = "RequestAutocomplete.PopupInDialog";
LogUMAHistogramEnumeration(name, event, NUM_DIALOG_POPUP_EVENTS);
Ilya Sherman 2013/09/03 20:57:05 nit: Please update this to use the regular UMA_HIS
Raman Kakilate 2013/09/03 21:50:31 Done.
}
void AutofillMetrics::LogDialogSecurityMetric(
- autofill::DialogType dialog_type,
DialogSecurityMetric metric) const {
- std::string name = GetPrefixForDialogType(dialog_type) + ".Security";
+ std::string name = "RequestAutocomplete.Security";
LogUMAHistogramEnumeration(name, metric, NUM_DIALOG_SECURITY_METRICS);
Ilya Sherman 2013/09/03 20:57:05 nit: Please update this to use the regular UMA_HIS
Raman Kakilate 2013/09/03 21:50:31 Done.
}
void AutofillMetrics::LogDialogUiDuration(
const base::TimeDelta& duration,
- autofill::DialogType dialog_type,
DialogDismissalAction dismissal_action) const {
- std::string prefix = GetPrefixForDialogType(dialog_type);
-
std::string suffix;
switch (dismissal_action) {
case DIALOG_ACCEPTED:
@@ -383,19 +360,18 @@ void AutofillMetrics::LogDialogUiDuration(
break;
}
- LogUMAHistogramLongTimes(prefix + ".UiDuration", duration);
- LogUMAHistogramLongTimes(prefix + ".UiDuration." + suffix, duration);
+ LogUMAHistogramLongTimes("RequestAutocomplete.UiDuration", duration);
+ LogUMAHistogramLongTimes("RequestAutocomplete.UiDuration." + suffix,
+ duration);
}
-void AutofillMetrics::LogDialogUiEvent(autofill::DialogType dialog_type,
- DialogUiEvent event) const {
- std::string name = GetPrefixForDialogType(dialog_type) + ".UiEvents";
+void AutofillMetrics::LogDialogUiEvent(DialogUiEvent event) const {
+ std::string name = "RequestAutocomplete.UiEvents";
LogUMAHistogramEnumeration(name, event, NUM_DIALOG_UI_EVENTS);
Ilya Sherman 2013/09/03 20:57:05 nit: Please update this to use the regular UMA_HIS
Raman Kakilate 2013/09/03 21:50:31 Done.
}
-void AutofillMetrics::LogWalletErrorMetric(autofill::DialogType dialog_type,
- WalletErrorMetric metric) const {
- std::string name = GetPrefixForDialogType(dialog_type) + ".WalletErrors";
+void AutofillMetrics::LogWalletErrorMetric(WalletErrorMetric metric) const {
+ std::string name = "RequestAutocomplete.WalletErrors";
LogUMAHistogramEnumeration(name, metric, NUM_WALLET_ERROR_METRICS);
Ilya Sherman 2013/09/03 20:57:05 nit: Please update this to use the regular UMA_HIS
Raman Kakilate 2013/09/03 21:50:32 Done.
}
@@ -407,10 +383,8 @@ void AutofillMetrics::LogWalletApiCallDuration(
}
void AutofillMetrics::LogWalletRequiredActionMetric(
- autofill::DialogType dialog_type,
WalletRequiredActionMetric required_action) const {
- std::string name =
- GetPrefixForDialogType(dialog_type) + ".WalletRequiredActions";
+ std::string name = "RequestAutocomplete.WalletRequiredActions";
LogUMAHistogramEnumeration(
name, required_action, NUM_WALLET_REQUIRED_ACTIONS);
Ilya Sherman 2013/09/03 20:57:05 nit: Please update this to use the regular UMA_HIS
Raman Kakilate 2013/09/03 21:50:32 Done.
}

Powered by Google App Engine
This is Rietveld 408576698