Index: chrome/browser/extensions/extension_webstore_private_api.cc |
diff --git a/chrome/browser/extensions/extension_webstore_private_api.cc b/chrome/browser/extensions/extension_webstore_private_api.cc |
index eb3c993ff2bbc69cb1771df663bb528c4b3a1e3a..4fe40ed4e507add5755e66ace49d2e064616a8e5 100644 |
--- a/chrome/browser/extensions/extension_webstore_private_api.cc |
+++ b/chrome/browser/extensions/extension_webstore_private_api.cc |
@@ -454,6 +454,12 @@ void BeginInstallWithManifestFunction::InstallUIProceed() { |
SetResult(ERROR_NONE); |
SendResponse(true); |
+ // The Permissions_Install histogram is recorded from the ExtensionService |
+ // for all extension installs, so we only need to record the web store |
+ // specific histogram here. |
+ ExtensionService::RecordPermissionMessagesHistogram( |
+ dummy_extension_, "Extensions.Permissions_WebStoreInstall"); |
+ |
// Matches the AddRef in RunImpl(). |
Release(); |
} |
@@ -463,6 +469,21 @@ void BeginInstallWithManifestFunction::InstallUIAbort(bool user_initiated) { |
SetResult(USER_CANCELLED); |
SendResponse(false); |
+ // The web store install histograms are a subset of the install histograms. |
+ // We need to record both histograms here since CrxInstaller::InstallUIAbort |
+ // is never called for web store install cancellations |
+ std::string histogram_name = user_initiated ? |
+ "Extensions.Permissions_WebStoreInstallCancel" : |
+ "Extensions.Permissions_WebStoreInstallAbort"; |
+ ExtensionService::RecordPermissionMessagesHistogram( |
+ dummy_extension_, histogram_name.c_str()); |
+ |
+ histogram_name = user_initiated ? |
+ "Extensions.Permissions_InstallCancel" : |
+ "Extensions.Permissions_InstallAbort"; |
+ ExtensionService::RecordPermissionMessagesHistogram( |
+ dummy_extension_, histogram_name.c_str()); |
+ |
// Matches the AddRef in RunImpl(). |
Release(); |
} |