summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_updater.cc
diff options
context:
space:
mode:
authorasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-03 02:23:39 +0000
committerasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-03 02:23:39 +0000
commit1fab845897104bac4d4791834290882ccf4ea44d (patch)
treef62c4f2db329abc3086a28000a32b7b65e110e7e /chrome/browser/extensions/extension_updater.cc
parente662e8d9e42d9250ef5ebed4067ecdd146552581 (diff)
downloadchromium_src-1fab845897104bac4d4791834290882ccf4ea44d.zip
chromium_src-1fab845897104bac4d4791834290882ccf4ea44d.tar.gz
chromium_src-1fab845897104bac4d4791834290882ccf4ea44d.tar.bz2
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
Diffstat (limited to 'chrome/browser/extensions/extension_updater.cc')
-rw-r--r--chrome/browser/extensions/extension_updater.cc13
1 files changed, 9 insertions, 4 deletions
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<GURL> 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_));
}