diff options
author | ramankk@chromium.org <ramankk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-11 00:48:15 +0000 |
---|---|---|
committer | ramankk@chromium.org <ramankk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-11 00:48:15 +0000 |
commit | 10109c47e50b0c3ef5c4e6875b94218eceddcdc6 (patch) | |
tree | 4fa967bbd06c38d5becae1e81380df7b8f105250 /components | |
parent | fa9def86b6ca6b7f921b75f13c11375ac5d511f6 (diff) | |
download | chromium_src-10109c47e50b0c3ef5c4e6875b94218eceddcdc6.zip chromium_src-10109c47e50b0c3ef5c4e6875b94218eceddcdc6.tar.gz chromium_src-10109c47e50b0c3ef5c4e6875b94218eceddcdc6.tar.bz2 |
rAc: Wallet: UMA for wallet response codes.
(Attempt 2)
BUG=261814
Review URL: https://chromiumcodereview.appspot.com/23962003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222430 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components')
-rw-r--r-- | components/autofill/content/browser/wallet/wallet_client.cc | 2 | ||||
-rw-r--r-- | components/autofill/core/browser/autofill_metrics.cc | 5 | ||||
-rw-r--r-- | components/autofill/core/browser/autofill_metrics.h | 3 |
3 files changed, 10 insertions, 0 deletions
diff --git a/components/autofill/content/browser/wallet/wallet_client.cc b/components/autofill/content/browser/wallet/wallet_client.cc index 4756c21..9e90515 100644 --- a/components/autofill/content/browser/wallet/wallet_client.cc +++ b/components/autofill/content/browser/wallet/wallet_client.cc @@ -595,6 +595,8 @@ void WalletClient::OnURLFetchComplete( scoped_ptr<base::DictionaryValue> response_dict; int response_code = source->GetResponseCode(); + delegate_->GetMetricLogger().LogWalletResponseCode(response_code); + switch (response_code) { // HTTP_BAD_REQUEST means the arguments are invalid. No point retrying. case net::HTTP_BAD_REQUEST: { diff --git a/components/autofill/core/browser/autofill_metrics.cc b/components/autofill/core/browser/autofill_metrics.cc index 98df16d..e4ad366 100644 --- a/components/autofill/core/browser/autofill_metrics.cc +++ b/components/autofill/core/browser/autofill_metrics.cc @@ -6,6 +6,7 @@ #include "base/logging.h" #include "base/metrics/histogram.h" +#include "base/metrics/sparse_histogram.h" #include "base/time/time.h" #include "components/autofill/core/browser/autofill_type.h" #include "components/autofill/core/browser/form_structure.h" @@ -386,6 +387,10 @@ void AutofillMetrics::LogWalletRequiredActionMetric( required_action, NUM_WALLET_REQUIRED_ACTIONS); } +void AutofillMetrics::LogWalletResponseCode(int response_code) const { + UMA_HISTOGRAM_SPARSE_SLOWLY("Wallet.ResponseCode", response_code); +} + void AutofillMetrics::LogDeveloperEngagementMetric( DeveloperEngagementMetric metric) const { DCHECK_LT(metric, NUM_DEVELOPER_ENGAGEMENT_METRICS); diff --git a/components/autofill/core/browser/autofill_metrics.h b/components/autofill/core/browser/autofill_metrics.h index 1c8de64..00d138e 100644 --- a/components/autofill/core/browser/autofill_metrics.h +++ b/components/autofill/core/browser/autofill_metrics.h @@ -389,6 +389,9 @@ class AutofillMetrics { virtual void LogWalletRequiredActionMetric( WalletRequiredActionMetric required_action) const; + // Logs HTTP response codes recieved by wallet client. + virtual void LogWalletResponseCode(int response_code) const; + // This should be called when a form that has been Autofilled is submitted. // |duration| should be the time elapsed between form load and submission. virtual void LogFormFillDurationFromLoadWithAutofill( |