diff options
author | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-04 22:09:41 +0000 |
---|---|---|
committer | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-04 22:09:41 +0000 |
commit | ff1d173e3ff3eddd867ed20bbef9fa2375d8580b (patch) | |
tree | 8077ecdd2e2b93cab1e93855fb539630a2d55720 /chrome/service/service_process.h | |
parent | 0376e364459cc52fd417eeda5d071a012bb10ee7 (diff) | |
download | chromium_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_process.h')
-rw-r--r-- | chrome/service/service_process.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/service/service_process.h b/chrome/service/service_process.h index 55c6d62..3e99d21 100644 --- a/chrome/service/service_process.h +++ b/chrome/service/service_process.h @@ -104,8 +104,11 @@ class ServiceProcess : public RemotingDirectoryService::Client, #endif private: - // Shuts down the process if no services are enabled. - void ShutdownIfNoServices(); + // Schedule a call to ShutdownIfNeeded. + void ScheduleShutdownCheck(); + // Shuts down the process if no services are enabled and no clients are + // connected. + void ShutdownIfNeeded(); // Called exactly ONCE per process instance for each service that gets // enabled in this process. void OnServiceEnabled(); |