Chromium Code Reviews| Index: chrome/browser/extensions/api/webstore_private/webstore_private_api.cc |
| diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc |
| index 3c664aae23f8565efe33f515e32e4b7570a4928c..f0bc02173b7d473a53279e38e649c95e2b8c83a3 100644 |
| --- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc |
| +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc |
| @@ -8,6 +8,7 @@ |
| #include "base/command_line.h" |
| #include "base/lazy_instance.h" |
| #include "base/memory/scoped_vector.h" |
| +#include "base/metrics/histogram.h" |
| #include "base/prefs/pref_service.h" |
| #include "base/strings/string_util.h" |
| #include "base/strings/utf_string_conversions.h" |
| @@ -183,6 +184,10 @@ void SetWebstoreLogin(Profile* profile, const std::string& login) { |
| profile->GetPrefs()->SetString(kWebstoreLogin, login); |
| } |
| +void RecordWebstoreExtensionInstallResult(bool success) { |
| + UMA_HISTOGRAM_BOOLEAN("Webstore.ExtensionInstallResult", success); |
|
asargent_no_longer_on_chrome
2013/11/07 00:18:47
Does the histograms dashboard have an easy way for
jackhou1
2013/11/11 22:59:25
Ah, thanks for pointing this out. The dashboard do
|
| +} |
| + |
| } // namespace |
| // static |
| @@ -577,6 +582,8 @@ void WebstorePrivateCompleteInstallFunction::OnExtensionInstallSuccess( |
| g_pending_installs.Get().EraseInstall(GetProfile(), id); |
| SendResponse(true); |
| + RecordWebstoreExtensionInstallResult(true); |
| + |
| // Matches the AddRef in RunImpl(). |
| Release(); |
| } |
| @@ -595,6 +602,8 @@ void WebstorePrivateCompleteInstallFunction::OnExtensionInstallFailure( |
| g_pending_installs.Get().EraseInstall(GetProfile(), id); |
| SendResponse(false); |
| + RecordWebstoreExtensionInstallResult(false); |
| + |
| // Matches the AddRef in RunImpl(). |
| Release(); |
| } |