diff options
Diffstat (limited to 'chrome/common/service_process_util.h')
-rw-r--r-- | chrome/common/service_process_util.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/chrome/common/service_process_util.h b/chrome/common/service_process_util.h index c84069a..8876426 100644 --- a/chrome/common/service_process_util.h +++ b/chrome/common/service_process_util.h @@ -7,6 +7,7 @@ #include <string> +#include "base/process.h" #include "base/task.h" // Return the IPC channel to connect to the service process. @@ -20,11 +21,11 @@ std::string GetServiceProcessChannelName(); // Returns false is another service process is already running. bool TakeServiceProcessSingletonLock(); -// Signal that the service process is running. +// Signal that the service process is ready. // This method is called when the service process is running and initialized. // |shutdown_task| is invoked when we get a shutdown request from another -// process (in the same thread that called SignalServiceProcessRunning). -void SignalServiceProcessRunning(Task* shutdown_task); +// process (in the same thread that called SignalServiceProcessReady). +void SignalServiceProcessReady(Task* shutdown_task); // Signal that the service process is stopped. void SignalServiceProcessStopped(); @@ -44,10 +45,16 @@ bool ForceServiceProcessShutdown(const std::string& version); // -------------------------------------------------------------------------- -// This method checks that if the service process is running (ready to receive -// IPC commands). +// This method checks that if the service process is ready to receive +// IPC commands. +bool CheckServiceProcessReady(); -bool CheckServiceProcessRunning(); +// Returns the process id of the currently running service process. Returns 0 +// if no service process is running. +// Note: DO NOT use this check whether the service process is ready because +// a non-zero return value only means that the process is running and not that +// it is ready to receive IPC commands. This method is only exposed for testing. +base::ProcessId GetServiceProcessPid(); // -------------------------------------------------------------------------- #endif // CHROME_COMMON_SERVICE_PROCESS_UTIL_H_ |