From cf8102524fdc24fc7765a45001eda182667bd40c Mon Sep 17 00:00:00 2001 From: "tedvessenes@gmail.com" Date: Thu, 12 Jan 2012 22:39:26 +0000 Subject: Convert use of int ms to TimeDelta in files owned by michaeln. R=michaeln@chromium.org BUG=108171 TEST= Review URL: http://codereview.chromium.org/9187029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117537 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/appcache/appcache_group.cc | 6 ++++-- webkit/appcache/appcache_storage_impl.cc | 10 +++++----- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'webkit') diff --git a/webkit/appcache/appcache_group.cc b/webkit/appcache/appcache_group.cc index 05e1ac5..1bc5a1f 100644 --- a/webkit/appcache/appcache_group.cc +++ b/webkit/appcache/appcache_group.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. @@ -231,7 +231,9 @@ void AppCacheGroup::ScheduleUpdateRestart(int delay_ms) { restart_update_task_.Reset( base::Bind(&AppCacheGroup::RunQueuedUpdates, this)); MessageLoop::current()->PostDelayedTask( - FROM_HERE, restart_update_task_.callback(), delay_ms); + FROM_HERE, + restart_update_task_.callback(), + base::TimeDelta::FromMilliseconds(delay_ms)); } void AppCacheGroup::HostDestructionImminent(AppCacheHost* host) { diff --git a/webkit/appcache/appcache_storage_impl.cc b/webkit/appcache/appcache_storage_impl.cc index 4e3c3be..e68cf27 100644 --- a/webkit/appcache/appcache_storage_impl.cc +++ b/webkit/appcache/appcache_storage_impl.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. @@ -283,12 +283,12 @@ void AppCacheStorageImpl::InitTask::RunCompleted() { if (!storage_->is_disabled()) { storage_->usage_map_.swap(usage_map_); - const int kDelayMillis = 5 * 60 * 1000; // Five minutes. + const base::TimeDelta kDelay = base::TimeDelta::FromMinutes(5); MessageLoop::current()->PostDelayedTask( FROM_HERE, base::Bind(&AppCacheStorageImpl::DelayedStartDeletingUnusedResponses, storage_->weak_factory_.GetWeakPtr()), - kDelayMillis); + kDelay); } if (storage_->service()->quota_client()) @@ -1572,12 +1572,12 @@ void AppCacheStorageImpl::StartDeletingResponses( void AppCacheStorageImpl::ScheduleDeleteOneResponse() { DCHECK(!is_response_deletion_scheduled_); - const int kDelayMillis = 10; + const base::TimeDelta kDelay = base::TimeDelta::FromMilliseconds(10); MessageLoop::current()->PostDelayedTask( FROM_HERE, base::Bind(&AppCacheStorageImpl::DeleteOneResponse, weak_factory_.GetWeakPtr()), - kDelayMillis); + kDelay); is_response_deletion_scheduled_ = true; } -- cgit v1.1