summaryrefslogtreecommitdiffstats
path: root/chrome/service/service_main.cc
diff options
context:
space:
mode:
authorsanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-04 22:09:41 +0000
committersanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-04 22:09:41 +0000
commitff1d173e3ff3eddd867ed20bbef9fa2375d8580b (patch)
tree8077ecdd2e2b93cab1e93855fb539630a2d55720 /chrome/service/service_main.cc
parent0376e364459cc52fd417eeda5d071a012bb10ee7 (diff)
downloadchromium_src-ff1d173e3ff3eddd867ed20bbef9fa2375d8580b.zip
chromium_src-ff1d173e3ff3eddd867ed20bbef9fa2375d8580b.tar.gz
chromium_src-ff1d173e3ff3eddd867ed20bbef9fa2375d8580b.tar.bz2
The service process now enables a timebomb on startup to check if its services are needed. If not, it shuts down. Also the ShutdownIfNeeded method checks to see if clients are connected before shutting down. And we only try to recreate the channel if we were previously connected to a client.
BUG=None. TEST=Run the service process without any enabled services. It should die within a minute. Review URL: http://codereview.chromium.org/3562004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61421 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service/service_main.cc')
-rw-r--r--chrome/service/service_main.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/service/service_main.cc b/chrome/service/service_main.cc
index 28eda80..f71c405 100644
--- a/chrome/service/service_main.cc
+++ b/chrome/service/service_main.cc
@@ -29,7 +29,11 @@ int ServiceProcessMain(const MainFunctionParams& parameters) {
#endif // defined(OS_WIN)
ServiceProcess service_process;
- service_process.Initialize(&main_message_loop, parameters.command_line_);
+ if (!service_process.Initialize(&main_message_loop,
+ parameters.command_line_)) {
+ LOG(ERROR) << "Service process failed to initialize";
+ return 0;
+ }
MessageLoop::current()->Run();
service_process.Teardown();