diff options
author | tedvessenes@gmail.com <tedvessenes@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-12 21:58:47 +0000 |
---|---|---|
committer | tedvessenes@gmail.com <tedvessenes@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-12 21:58:47 +0000 |
commit | fc4252a70727cb552d1cd09873e4aff6f003fc64 (patch) | |
tree | 95d4572088ac1d701ecc2881ded5510503bbaa17 | |
parent | caa1aafd6ab2618d87b7a274dc61c73577e746e8 (diff) | |
download | chromium_src-fc4252a70727cb552d1cd09873e4aff6f003fc64.zip chromium_src-fc4252a70727cb552d1cd09873e4aff6f003fc64.tar.gz chromium_src-fc4252a70727cb552d1cd09873e4aff6f003fc64.tar.bz2 |
Convert use of int ms to TimeDelta in files owned by jar.
R=jar@chromium.org
BUG=108171
TEST=
Review URL: http://codereview.chromium.org/9191001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117524 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/metrics/metrics_reporting_scheduler.cc | 4 | ||||
-rw-r--r-- | chrome/browser/metrics/metrics_service.cc | 10 | ||||
-rw-r--r-- | chrome/browser/metrics/thread_watcher.cc | 18 | ||||
-rw-r--r-- | chrome/browser/metrics/thread_watcher.h | 4 | ||||
-rw-r--r-- | content/browser/net/url_request_slow_download_job.cc | 6 |
5 files changed, 21 insertions, 21 deletions
diff --git a/chrome/browser/metrics/metrics_reporting_scheduler.cc b/chrome/browser/metrics/metrics_reporting_scheduler.cc index 3cd53e28..05ff108 100644 --- a/chrome/browser/metrics/metrics_reporting_scheduler.cc +++ b/chrome/browser/metrics/metrics_reporting_scheduler.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. @@ -94,7 +94,7 @@ void MetricsReportingScheduler::ScheduleNextCallback() { FROM_HERE, base::Bind(&MetricsReportingScheduler::TriggerUpload, weak_ptr_factory_.GetWeakPtr()), - upload_interval_.InMilliseconds()); + upload_interval_); } void MetricsReportingScheduler::BackOffUploadInterval() { diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc index d277767..305c930 100644 --- a/chrome/browser/metrics/metrics_service.cc +++ b/chrome/browser/metrics/metrics_service.cc @@ -220,8 +220,8 @@ static const int kEventLimit = 2400; // limit is exceeded. static const int kUploadLogAvoidRetransmitSize = 50000; -// Interval, in seconds, between state saves. -static const int kSaveStateInterval = 5 * 60; // five minutes +// Interval, in minutes, between state saves. +static const int kSaveStateIntervalMinutes = 5; // static MetricsService::ShutdownCleanliness MetricsService::clean_shutdown_status_ = @@ -766,7 +766,7 @@ void MetricsService::ScheduleNextStateSave() { MessageLoop::current()->PostDelayedTask(FROM_HERE, base::Bind(&MetricsService::SaveLocalState, state_saver_factory_.GetWeakPtr()), - kSaveStateInterval * 1000); + base::TimeDelta::FromMinutes(kSaveStateIntervalMinutes)); } void MetricsService::SaveLocalState() { @@ -778,7 +778,7 @@ void MetricsService::SaveLocalState() { RecordCurrentState(pref); - // TODO(jar): Does this run down the batteries???? + // TODO(jar):110021 Does this run down the batteries???? ScheduleNextStateSave(); } @@ -805,7 +805,7 @@ void MetricsService::StartRecording() { base::Bind(&MetricsService::InitTaskGetHardwareClass, base::Unretained(this), MessageLoop::current()->message_loop_proxy()), - kInitializationDelaySeconds * 1000); + kInitializationDelaySeconds); } } diff --git a/chrome/browser/metrics/thread_watcher.cc b/chrome/browser/metrics/thread_watcher.cc index 93feea4..7ecc304 100644 --- a/chrome/browser/metrics/thread_watcher.cc +++ b/chrome/browser/metrics/thread_watcher.cc @@ -230,7 +230,7 @@ void ThreadWatcher::PostPingMessage() { FROM_HERE, base::Bind(&ThreadWatcher::OnCheckResponsiveness, weak_ptr_factory_.GetWeakPtr(), ping_sequence_number_), - unresponsive_time_.InMilliseconds()); + unresponsive_time_); } else { // Watched thread might have gone away, stop watching it. DeActivateThreadWatching(); @@ -266,7 +266,7 @@ void ThreadWatcher::OnPongMessage(uint64 ping_sequence_number) { FROM_HERE, base::Bind(&ThreadWatcher::PostPingMessage, weak_ptr_factory_.GetWeakPtr()), - sleep_time_.InMilliseconds()); + sleep_time_); } void ThreadWatcher::OnCheckResponsiveness(uint64 ping_sequence_number) { @@ -295,7 +295,7 @@ void ThreadWatcher::OnCheckResponsiveness(uint64 ping_sequence_number) { FROM_HERE, base::Bind(&ThreadWatcher::OnCheckResponsiveness, weak_ptr_factory_.GetWeakPtr(), ping_sequence_number_), - unresponsive_time_.InMilliseconds()); + unresponsive_time_); responsive_ = false; } @@ -423,7 +423,7 @@ void ThreadWatcherList::StartWatchingAll(const CommandLine& command_line) { unresponsive_threshold, crash_on_hang_thread_names, live_threads_threshold), - base::TimeDelta::FromSeconds(120).InMilliseconds()); + base::TimeDelta::FromSeconds(120)); } // static @@ -731,28 +731,28 @@ bool WatchDogThread::CurrentlyOnWatchDogThread() { // static bool WatchDogThread::PostTask(const tracked_objects::Location& from_here, const base::Closure& task) { - return PostTaskHelper(from_here, task, 0); + return PostTaskHelper(from_here, task, base::TimeDelta()); } // static bool WatchDogThread::PostDelayedTask(const tracked_objects::Location& from_here, const base::Closure& task, - int64 delay_ms) { - return PostTaskHelper(from_here, task, delay_ms); + base::TimeDelta delay) { + return PostTaskHelper(from_here, task, delay); } // static bool WatchDogThread::PostTaskHelper( const tracked_objects::Location& from_here, const base::Closure& task, - int64 delay_ms) { + base::TimeDelta delay) { { base::AutoLock lock(g_watchdog_lock.Get()); MessageLoop* message_loop = g_watchdog_thread ? g_watchdog_thread->message_loop() : NULL; if (message_loop) { - message_loop->PostDelayedTask(from_here, task, delay_ms); + message_loop->PostDelayedTask(from_here, task, delay); return true; } } diff --git a/chrome/browser/metrics/thread_watcher.h b/chrome/browser/metrics/thread_watcher.h index d876caf..698aba3 100644 --- a/chrome/browser/metrics/thread_watcher.h +++ b/chrome/browser/metrics/thread_watcher.h @@ -475,7 +475,7 @@ class WatchDogThread : public base::Thread { const base::Closure& task); static bool PostDelayedTask(const tracked_objects::Location& from_here, const base::Closure& task, - int64 delay_ms); + base::TimeDelta delay); protected: virtual void Init() OVERRIDE; @@ -485,7 +485,7 @@ class WatchDogThread : public base::Thread { static bool PostTaskHelper( const tracked_objects::Location& from_here, const base::Closure& task, - int64 delay_ms); + base::TimeDelta delay); DISALLOW_COPY_AND_ASSIGN(WatchDogThread); }; diff --git a/content/browser/net/url_request_slow_download_job.cc b/content/browser/net/url_request_slow_download_job.cc index d15a50c..3f01cdf 100644 --- a/content/browser/net/url_request_slow_download_job.cc +++ b/content/browser/net/url_request_slow_download_job.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. @@ -170,7 +170,7 @@ bool URLRequestSlowDownloadJob::ReadRawData(net::IOBuffer* buf, int buf_size, FROM_HERE, base::Bind(&URLRequestSlowDownloadJob::CheckDoneStatus, weak_factory_.GetWeakPtr()), - 100); + base::TimeDelta::FromMilliseconds(100)); return false; case REQUEST_COMPLETE: *bytes_read = 0; @@ -194,7 +194,7 @@ void URLRequestSlowDownloadJob::CheckDoneStatus() { FROM_HERE, base::Bind(&URLRequestSlowDownloadJob::CheckDoneStatus, weak_factory_.GetWeakPtr()), - 100); + base::TimeDelta::FromMilliseconds(100)); } } |