summaryrefslogtreecommitdiffstats
path: root/chrome/service/service_process.cc
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-31 19:23:14 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-31 19:23:14 +0000
commit1e1fd49cfd5b770a7bdba08bfbba321748325f31 (patch)
treea7ff5c758fd389beaac2c7ac8ffc4b96635a383f /chrome/service/service_process.cc
parentb21d691e4e486071ac8601fee7867c29729faca6 (diff)
downloadchromium_src-1e1fd49cfd5b770a7bdba08bfbba321748325f31.zip
chromium_src-1e1fd49cfd5b770a7bdba08bfbba321748325f31.tar.gz
chromium_src-1e1fd49cfd5b770a7bdba08bfbba321748325f31.tar.bz2
Use named events instead of lock files for service process
Use named events to signal that a service process is running. BUG=52891 TEST=browser_tests --gtest_filter=ServiceProcess* Review URL: http://codereview.chromium.org/3268003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58041 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service/service_process.cc')
-rw-r--r--chrome/service/service_process.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc
index 9ebed07..4fd8f70 100644
--- a/chrome/service/service_process.cc
+++ b/chrome/service/service_process.cc
@@ -72,7 +72,7 @@ bool ServiceProcess::Initialize(MessageLoop* message_loop) {
// Check if remoting host is already enabled.
if (values->GetBoolean(prefs::kRemotingHostEnabled, &remoting_host_enabled) &&
- remoting_host_enabled) {
+ remoting_host_enabled) {
// If true then we start the host.
StartChromotingHost();
}
@@ -85,11 +85,10 @@ bool ServiceProcess::Initialize(MessageLoop* message_loop) {
GetServiceProcessChannelName(kServiceProcessCloudPrint)));
ipc_server_->Init();
- // After the IPC server has started we can create the lock file to indicate
- // that we have started.
- bool ret = CreateServiceProcessLockFile(kServiceProcessCloudPrint);
- DCHECK(ret) << "Failed to create service process lock file.";
- return ret;
+ // After the IPC server has started we signal that the service process is
+ // running.
+ SignalServiceProcessRunning(kServiceProcessCloudPrint);
+ return true;
}
bool ServiceProcess::Teardown() {
@@ -114,9 +113,8 @@ bool ServiceProcess::Teardown() {
network_change_notifier_.reset();
// Delete the service process lock file when it shuts down.
- bool ret = DeleteServiceProcessLockFile(kServiceProcessCloudPrint);
- DCHECK(ret) << "Failed to delete service process lock file.";
- return ret;
+ SignalServiceProcessStopped(kServiceProcessCloudPrint);
+ return true;
}
void ServiceProcess::Shutdown() {