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

Unified Diff: chrome/common/service_process_util_win.cc

Issue 6349029: Get service processes working on Mac and Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix up small typo in comment Created 9 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/common/service_process_util_unittest.cc ('k') | chrome/service/service_ipc_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/service_process_util_win.cc
diff --git a/chrome/common/service_process_util_win.cc b/chrome/common/service_process_util_win.cc
index eb784a54c5127e7074d199c8d7c08d0db156a3fd..e78bd73e5f4000b513b69444e2bbb9520743851b 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;
-}
« no previous file with comments | « chrome/common/service_process_util_unittest.cc ('k') | chrome/service/service_ipc_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698