From 0db124b0b4d60f0c5780ec1dbb52717386097388 Mon Sep 17 00:00:00 2001 From: "mek@chromium.org" Date: Wed, 7 Nov 2012 04:55:05 +0000 Subject: First couple of steps of improving the extension/app update process. For Apps and Extensions with a lazy background page, this will delay installing an update until the background page gets unloaded (or next chrome restart). Also adds a chrome.runtime.onUpdateAvailable event which is fired when an update is available but isn't being installed immediately because the app is not idle. It doesn't change anything yet for Extensions with a persistent background page (or extensions without a background page at all). Those still get updated as soon as an update is found. BUG=37971 BUG=143260 TBR=nick@chromium.org Review URL: https://chromiumcodereview.appspot.com/11293002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166358 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/extensions/crx_installer.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'chrome/browser/extensions/crx_installer.cc') diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc index 040e353..0ee089b 100644 --- a/chrome/browser/extensions/crx_installer.cc +++ b/chrome/browser/extensions/crx_installer.cc @@ -103,7 +103,8 @@ CrxInstaller::CrxInstaller( record_oauth2_grant_(false), error_on_unsupported_requirements_(false), requirements_checker_(new extensions::RequirementsChecker()), - has_requirement_errors_(false) { + has_requirement_errors_(false), + install_wait_for_idle_(true) { if (!approval) return; @@ -630,7 +631,8 @@ void CrxInstaller::ReportSuccessFromUIThread() { // extension_ to it. frontend_weak_->OnExtensionInstalled(extension_, page_ordinal_, - has_requirement_errors_); + has_requirement_errors_, + install_wait_for_idle_); NotifyCrxInstallComplete(extension_.get()); -- cgit v1.1