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

Unified Diff: chrome/browser/extensions/api/webstore_private/webstore_private_api.cc

Issue 46583007: Download webstore CRXs into separate directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Control via field trial. Add UMA for webstore installs. Created 7 years, 1 month 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 | chrome/browser/extensions/webstore_installer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | chrome/browser/extensions/webstore_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698