diff options
author | tedvessenes@gmail.com <tedvessenes@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-04 02:10:33 +0000 |
---|---|---|
committer | tedvessenes@gmail.com <tedvessenes@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-04 02:10:33 +0000 |
commit | 73251e7180c5c9359ad628ac6d0b8155f06c7e54 (patch) | |
tree | af9465421cff1dc5775612b3026d38ae79faa80f /chrome/browser/component_updater | |
parent | c5eda9e1d45dad06bb41f175bd082132e0818c47 (diff) | |
download | chromium_src-73251e7180c5c9359ad628ac6d0b8155f06c7e54.zip chromium_src-73251e7180c5c9359ad628ac6d0b8155f06c7e54.tar.gz chromium_src-73251e7180c5c9359ad628ac6d0b8155f06c7e54.tar.bz2 |
Convert uses of int ms to TimeDelta in component updater.
R=cpu@chromium.org
BUG=108171
Review URL: http://codereview.chromium.org/9580037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124884 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/component_updater')
3 files changed, 18 insertions, 9 deletions
diff --git a/chrome/browser/component_updater/component_updater_service.cc b/chrome/browser/component_updater/component_updater_service.cc index 0c090cc..9b112bc 100644 --- a/chrome/browser/component_updater/component_updater_service.cc +++ b/chrome/browser/component_updater/component_updater_service.cc @@ -703,12 +703,14 @@ void CrxUpdateService::OnURLFetchComplete(const content::URLFetcher* source, content::NotificationService::NoDetails()); // Why unretained? See comment at top of file. - BrowserThread::PostDelayedTask(BrowserThread::FILE, FROM_HERE, + BrowserThread::PostDelayedTask( + BrowserThread::FILE, + FROM_HERE, base::Bind(&CrxUpdateService::Install, base::Unretained(this), context, temp_crx_path), - config_->StepDelay()); + base::TimeDelta::FromMilliseconds(config_->StepDelay())); } } @@ -726,10 +728,12 @@ void CrxUpdateService::Install(const CRXContext* context, NOTREACHED() << crx_path.value(); } // Why unretained? See comment at top of file. - BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE, + BrowserThread::PostDelayedTask( + BrowserThread::UI, + FROM_HERE, base::Bind(&CrxUpdateService::DoneInstalling, base::Unretained(this), context->id, unpacker.error()), - config_->StepDelay()); + base::TimeDelta::FromMilliseconds(config_->StepDelay())); delete context; } diff --git a/chrome/browser/component_updater/npapi_flash_component_installer.cc b/chrome/browser/component_updater/npapi_flash_component_installer.cc index 7baffbd..a475ce8 100644 --- a/chrome/browser/component_updater/npapi_flash_component_installer.cc +++ b/chrome/browser/component_updater/npapi_flash_component_installer.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -212,10 +212,12 @@ void RegisterNPAPIFlashComponent(ComponentUpdateService* cus) { // Post the task to the FILE thread because IO may be done once the plugins // are loaded. - BrowserThread::PostDelayedTask(BrowserThread::FILE, FROM_HERE, + BrowserThread::PostDelayedTask( + BrowserThread::FILE, + FROM_HERE, base::Bind(&PluginService::GetPlugins, base::Unretained(PluginService::GetInstance()), base::Bind(&StartFlashUpdateRegistration, cus)), - 8000); + base::TimeDelta::FromSeconds(8)); #endif } diff --git a/chrome/browser/component_updater/recovery_component_installer.cc b/chrome/browser/component_updater/recovery_component_installer.cc index afba2fd..1c2d61b 100644 --- a/chrome/browser/component_updater/recovery_component_installer.cc +++ b/chrome/browser/component_updater/recovery_component_installer.cc @@ -134,7 +134,10 @@ void RegisterRecoveryComponent(ComponentUpdateService* cus, #if !defined(OS_CHROMEOS) // We delay execute the registration because we are not required in // the critical path during browser startup. - BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE, - base::Bind(&RecoveryRegisterHelper, cus, prefs), 6000); + BrowserThread::PostDelayedTask( + BrowserThread::UI, + FROM_HERE, + base::Bind(&RecoveryRegisterHelper, cus, prefs), + base::TimeDelta::FromSeconds(6)); #endif } |