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

Unified Diff: chrome/browser/extensions/extension_webstore_private_api.cc

Issue 7326002: Fix the Extensions.Permissions_InstallCancel histogram. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698