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

Unified Diff: chrome/service/service_process.cc

Issue 9230002: Convert use of int ms to TimeDelta in chrome/service files. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Restrict CL to chrome/service files. 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/print_system_cups.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/service_process.cc
diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc
index c5efbe72a3d3f7e91406792e371ab72dadf52a5d..d747c93c72f13d06095633bead046f6b50d9ab62 100644
--- a/chrome/service/service_process.cc
+++ b/chrome/service/service_process.cc
@@ -43,13 +43,13 @@ ServiceProcess* g_service_process = NULL;
namespace {
-// Delay in millseconds after the last service is disabled before we attempt
+// Delay in seconds after the last service is disabled before we attempt
// a shutdown.
-const int64 kShutdownDelay = 60000;
+const int kShutdownDelaySeconds = 60;
-// Delay in milliseconds between launching a browser process to check the
-// policy for us. 8 hours * 60 * 60 * 1000
-const int64 kPolicyCheckDelay = 28800000;
+// Delay in hours between launching a browser process to check the
+// policy for us.
+const int64 kPolicyCheckDelayHours = 8;
const char kDefaultServiceProcessLocale[] = "en-US";
@@ -356,7 +356,7 @@ void ServiceProcess::ScheduleShutdownCheck() {
MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&ServiceProcess::ShutdownIfNeeded, base::Unretained(this)),
- kShutdownDelay);
+ base::TimeDelta::FromSeconds(kShutdownDelaySeconds));
}
void ServiceProcess::ShutdownIfNeeded() {
@@ -378,7 +378,7 @@ void ServiceProcess::ScheduleCloudPrintPolicyCheck() {
FROM_HERE,
base::Bind(&ServiceProcess::CloudPrintPolicyCheckIfNeeded,
base::Unretained(this)),
- kPolicyCheckDelay);
+ base::TimeDelta::FromHours(kPolicyCheckDelayHours));
}
void ServiceProcess::CloudPrintPolicyCheckIfNeeded() {
« no previous file with comments | « chrome/service/cloud_print/print_system_cups.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698