summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/automation_provider.cc
diff options
context:
space:
mode:
authorskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-09 15:03:07 +0000
committerskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-09 15:03:07 +0000
commitcb0e5031953674b26014426ed9472d894c1e4653 (patch)
tree903d11251b28a3547313332d57e58b7781b33fa4 /chrome/browser/automation/automation_provider.cc
parent7f7c3ffe0daa85c72b98d567e01e146229ad99be (diff)
downloadchromium_src-cb0e5031953674b26014426ed9472d894c1e4653.zip
chromium_src-cb0e5031953674b26014426ed9472d894c1e4653.tar.gz
chromium_src-cb0e5031953674b26014426ed9472d894c1e4653.tar.bz2
Add histograms to understand why so many CRX installs fail in the field.
* Report path length to extensions dir. * Report cause and install source in histograms. * Add histogram to show why writing an update to a file might fail. * Don't create installer for crx that can't be read. BUG=81687 TEST=Manual: look at about:histogram Review URL: http://codereview.chromium.org/6932045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84617 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/automation_provider.cc')
-rw-r--r--chrome/browser/automation/automation_provider.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 64eef79..a29ae11 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -784,6 +784,7 @@ void AutomationProvider::InstallExtension(const FilePath& crx_path,
// Pass NULL for a silent install with no UI.
scoped_refptr<CrxInstaller> installer(service->MakeCrxInstaller(NULL));
+ installer->set_install_cause(extension_misc::INSTALL_CAUSE_AUTOMATION);
installer->InstallCrx(crx_path);
} else {
AutomationMsg_InstallExtension::WriteReplyParams(
@@ -816,6 +817,7 @@ void AutomationProvider::InstallExtensionAndGetHandle(
ExtensionInstallUI* client =
(with_ui ? new ExtensionInstallUI(profile_) : NULL);
scoped_refptr<CrxInstaller> installer(service->MakeCrxInstaller(client));
+ installer->set_install_cause(extension_misc::INSTALL_CAUSE_AUTOMATION);
installer->InstallCrx(crx_path);
} else {
AutomationMsg_InstallExtensionAndGetHandle::WriteReplyParams(