From 1fab845897104bac4d4791834290882ccf4ea44d Mon Sep 17 00:00:00 2001 From: "asargent@chromium.org" Date: Thu, 3 Sep 2009 02:23:39 +0000 Subject: Add an auto-update now button to chrome://extensions page BUG=http://crbug.com/17853 TEST=Install an old version of an extension with an available update, then go to chrome://extensions and hit the auto-update now button. The extension should update. Review URL: http://codereview.chromium.org/184005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25293 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/extensions/extension_updater.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'chrome/browser/extensions/extension_updater.cc') diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc index fe19ba5..511c218 100644 --- a/chrome/browser/extensions/extension_updater.cc +++ b/chrome/browser/extensions/extension_updater.cc @@ -462,6 +462,15 @@ void ExtensionUpdater::ScheduleNextCheck(const TimeDelta& target_delay) { } void ExtensionUpdater::TimerFired() { + CheckNow(); + + // Save the last check time, and schedule the next check. + int64 now = Time::Now().ToInternalValue(); + prefs_->SetInt64(kLastExtensionsUpdateCheck, now); + ScheduleNextCheck(TimeDelta::FromSeconds(frequency_seconds_)); +} + +void ExtensionUpdater::CheckNow() { // Generate a set of update urls for loaded extensions. std::set urls; @@ -501,10 +510,6 @@ void ExtensionUpdater::TimerFired() { // scheduled, so we don't need to check before calling it. StartUpdateCheck(*iter); } - // Save the last check time, and schedule the next check. - int64 now = Time::Now().ToInternalValue(); - prefs_->SetInt64(kLastExtensionsUpdateCheck, now); - ScheduleNextCheck(TimeDelta::FromSeconds(frequency_seconds_)); } -- cgit v1.1