Chromium Code Reviews| Index: components/autofill/core/browser/autofill_manager.cc |
| diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc |
| index 1e7a2cacfe19b19dcc46d3220b4294f6bb6eb162..73a0e68d8d3866308cc8120d1bce2314c85d814d 100644 |
| --- a/components/autofill/core/browser/autofill_manager.cc |
| +++ b/components/autofill/core/browser/autofill_manager.cc |
| @@ -1039,6 +1039,8 @@ void AutofillManager::OnDidGetUploadDetails( |
| weak_ptr_factory_.GetWeakPtr())); |
| AutofillMetrics::LogCardUploadDecisionMetric( |
| AutofillMetrics::UPLOAD_OFFERED); |
| + personal_data_->LogCardUploadDecisionMetricUkm( |
| + AutofillMetrics::UPLOAD_OFFERED); |
| } else { |
| // If the upload details request failed, fall back to a local save. The |
| // reasoning here is as follows: |
| @@ -1058,6 +1060,8 @@ void AutofillManager::OnDidGetUploadDetails( |
| base::Unretained(personal_data_), upload_request_.card)); |
| AutofillMetrics::LogCardUploadDecisionMetric( |
| AutofillMetrics::UPLOAD_NOT_OFFERED_GET_UPLOAD_DETAILS_FAILED); |
| + personal_data_->LogCardUploadDecisionMetricUkm( |
| + AutofillMetrics::UPLOAD_NOT_OFFERED_GET_UPLOAD_DETAILS_FAILED); |
| } |
|
Mathieu
2017/03/08 22:33:48
At this point I would call personal_data_->ResetUk
|
| } |
| @@ -1218,11 +1222,16 @@ void AutofillManager::ImportFormData(const FormStructure& submitted_form) { |
| &get_profiles_decision_metric, |
| &rappor_metric_name); |
|
Mathieu
2017/03/08 22:33:48
personal_data_->ResetUkmSession();
|
| + personal_data_->SetCardUploadDecisionMetricUrlUkm( |
| + submitted_form.source_url()); |
| + |
| // Both the CVC and address checks are done. Conform to the legacy order of |
| // reporting on CVC then address. |
| if (upload_request_.cvc.empty()) { |
| AutofillMetrics::LogCardUploadDecisionMetric( |
| AutofillMetrics::UPLOAD_NOT_OFFERED_NO_CVC); |
| + personal_data_->LogCardUploadDecisionMetricUkm( |
| + AutofillMetrics::UPLOAD_NOT_OFFERED_NO_CVC); |
| CollectRapportSample(submitted_form.source_url(), |
| "Autofill.CardUploadNotOfferedNoCvc"); |
| return; |
| @@ -1231,6 +1240,8 @@ void AutofillManager::ImportFormData(const FormStructure& submitted_form) { |
| DCHECK(get_profiles_decision_metric != AutofillMetrics::UPLOAD_OFFERED); |
| AutofillMetrics::LogCardUploadDecisionMetric( |
| get_profiles_decision_metric); |
| + personal_data_->LogCardUploadDecisionMetricUkm( |
| + get_profiles_decision_metric); |
| if (!rappor_metric_name.empty()) { |
| CollectRapportSample(submitted_form.source_url(), rappor_metric_name); |
| } |