diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-02 04:14:42 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-02 04:14:42 +0000 |
commit | c3498a1c9ead237b365f316b761ea3d534b671f9 (patch) | |
tree | 7c287f6bd53347a2e91a447ce28320ae2a55fa09 /chrome/common/service_process_util_win.cc | |
parent | 09f2b5517f8cb83a2a22e0249caf3dbd07dd8d08 (diff) | |
download | chromium_src-c3498a1c9ead237b365f316b761ea3d534b671f9.zip chromium_src-c3498a1c9ead237b365f316b761ea3d534b671f9.tar.gz chromium_src-c3498a1c9ead237b365f316b761ea3d534b671f9.tar.bz2 |
Get service processes working on Mac and Linux.
Service processes will now launch, and attach to ipc channels.
BUG=NONE
TEST=BUILD
Review URL: http://codereview.chromium.org/6349029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73425 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/service_process_util_win.cc')
-rw-r--r-- | chrome/common/service_process_util_win.cc | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/chrome/common/service_process_util_win.cc b/chrome/common/service_process_util_win.cc index eb784a5..e78bd73 100644 --- a/chrome/common/service_process_util_win.cc +++ b/chrome/common/service_process_util_win.cc @@ -9,6 +9,7 @@ #include "base/logging.h" #include "base/path_service.h" #include "base/string16.h" +#include "base/task.h" #include "base/utf_string_conversions.h" #include "base/win/object_watcher.h" #include "base/win/scoped_handle.h" @@ -54,7 +55,8 @@ class ServiceProcessShutdownMonitor } // namespace -bool ForceServiceProcessShutdown(const std::string& version) { +bool ForceServiceProcessShutdown(const std::string& version, + base::ProcessId process_id) { base::win::ScopedHandle shutdown_event; std::string versioned_name = version; versioned_name.append("_service_shutdown_evt"); @@ -99,20 +101,19 @@ bool ServiceProcessState::TakeSingletonLock() { return true; } -void ServiceProcessState::SignalReady(Task* shutdown_task) { +bool ServiceProcessState::SignalReady(MessageLoop *message_loop, + Task* shutdown_task) { DCHECK(state_); DCHECK(state_->ready_event.IsValid()); - SetEvent(state_->ready_event.Get()); + if (!SetEvent(state_->ready_event.Get())) { + return false; + } if (shutdown_task) { state_->shutdown_monitor.reset( new ServiceProcessShutdownMonitor(shutdown_task)); state_->shutdown_monitor->Start(); } -} - -void ServiceProcessState::SignalStopped() { - TearDownState(); - shared_mem_service_data_.reset(); + return true; } bool ServiceProcessState::AddToAutoRun() { @@ -140,7 +141,3 @@ void ServiceProcessState::TearDownState() { delete state_; state_ = NULL; } - -bool ServiceProcessState::ShouldHandleOtherVersion() { - return true; -} |