Chromium Code Reviews| Index: chrome/common/service_process_util.h |
| diff --git a/chrome/common/service_process_util.h b/chrome/common/service_process_util.h |
| index 28304e16dbbc849617b76af49ef8b2d993ef4b53..49131afb899a67221ec19c4e5380b64abd9c7b32 100644 |
| --- a/chrome/common/service_process_util.h |
| +++ b/chrome/common/service_process_util.h |
| @@ -10,6 +10,7 @@ |
| #include "base/process.h" |
| #include "base/scoped_ptr.h" |
| #include "base/shared_memory.h" |
| +#include "base/singleton.h" |
| #include "base/task.h" |
| // Return the IPC channel to connect to the service process. |
| @@ -48,8 +49,8 @@ bool ForceServiceProcessShutdown(const std::string& version); |
| // and this class are shared. |
| class ServiceProcessState { |
| public: |
| - ServiceProcessState(); |
| - ~ServiceProcessState(); |
| + // Returns the singleton instance. |
| + static ServiceProcessState* GetInstance(); |
| // Tries to become the sole service process for the current user data dir. |
| // Returns false is another service process is already running. |
|
willchan no longer on Chromium
2010/12/08 00:58:46
'is' should be 'if'.
Satish
2010/12/08 12:58:22
Done.
|
| @@ -70,6 +71,8 @@ class ServiceProcessState { |
| // Unregister the service process to run on startup. |
| bool RemoveFromAutoRun(); |
| private: |
|
willchan no longer on Chromium
2010/12/08 00:58:46
Add a newline. This is recommended in http://goog
Satish
2010/12/08 12:58:22
Done.
|
| + ServiceProcessState(); |
| + ~ServiceProcessState(); |
| // Create the shared memory data for the service process. |
| bool CreateSharedData(); |
| @@ -95,6 +98,8 @@ class ServiceProcessState { |
| struct StateData; |
| StateData* state_; |
| scoped_ptr<base::SharedMemory> shared_mem_service_data_; |
| + |
| + friend struct DefaultSingletonTraits<ServiceProcessState>; |
| }; |
| #endif // CHROME_COMMON_SERVICE_PROCESS_UTIL_H_ |