Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6867)

Unified Diff: chrome/service/cloud_print/cloud_print_proxy_backend.cc

Issue 9187023: Convert use of int ms to TimeDelta in files owned by ajwong. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove static class instance initialization. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/service/cloud_print/cloud_print_auth.cc ('k') | chrome/service/cloud_print/print_system_cups.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/cloud_print/cloud_print_proxy_backend.cc
diff --git a/chrome/service/cloud_print/cloud_print_proxy_backend.cc b/chrome/service/cloud_print/cloud_print_proxy_backend.cc
index 4b02dd80a1b55856c6ecebd324ccb92c55876abb..5809524c60bfb99632ef5c16d0ef5adf1815d9a1 100644
--- a/chrome/service/cloud_print/cloud_print_proxy_backend.cc
+++ b/chrome/service/cloud_print/cloud_print_proxy_backend.cc
@@ -399,12 +399,12 @@ void CloudPrintProxyBackend::Core::PollForJobs() {
void CloudPrintProxyBackend::Core::ScheduleJobPoll() {
if (!job_poll_scheduled_) {
- int interval_in_seconds = base::RandInt(kMinJobPollIntervalSecs,
- kMaxJobPollIntervalSecs);
+ base::TimeDelta interval = base::TimeDelta::FromSeconds(
+ base::RandInt(kMinJobPollIntervalSecs, kMaxJobPollIntervalSecs));
MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&CloudPrintProxyBackend::Core::PollForJobs, this),
- interval_in_seconds * 1000);
+ interval);
job_poll_scheduled_ = true;
}
}
« no previous file with comments | « chrome/service/cloud_print/cloud_print_auth.cc ('k') | chrome/service/cloud_print/print_system_cups.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698