Index: chrome/common/service_process_util_posix.h |
diff --git a/chrome/common/service_process_util_posix.h b/chrome/common/service_process_util_posix.h |
index 2a5339e7099b48088c855868a4f2781aeb751bcf..be6ec4831ce716020a31f39dc5bbf007fb44fc26 100644 |
--- a/chrome/common/service_process_util_posix.h |
+++ b/chrome/common/service_process_util_posix.h |
@@ -12,7 +12,9 @@ |
#include <memory> |
#include "base/callback.h" |
+#include "base/memory/ref_counted.h" |
#include "base/message_loop/message_loop.h" |
+#include "base/single_thread_task_runner.h" |
#include "build/build_config.h" |
#if defined(OS_POSIX) && !defined(OS_MACOSX) |
@@ -57,9 +59,9 @@ class ServiceProcessTerminateMonitor : public base::MessageLoopForIO::Watcher { |
base::Closure terminate_task_; |
}; |
-struct ServiceProcessState::StateData |
- : public base::RefCountedThreadSafe<ServiceProcessState::StateData> { |
+struct ServiceProcessState::StateData { |
StateData(); |
+ ~StateData(); |
// WatchFileDescriptor needs to be set up by the thread that is going |
// to be monitoring it. |
@@ -70,8 +72,7 @@ struct ServiceProcessState::StateData |
base::ScopedCFTypeRef<CFDictionaryRef> launchd_conf; |
base::FilePathWatcher executable_watcher; |
-#endif // OS_MACOSX |
-#if defined(OS_POSIX) && !defined(OS_MACOSX) |
+#else |
std::unique_ptr<MultiProcessLock> initializing_lock; |
std::unique_ptr<MultiProcessLock> running_lock; |
#endif |
@@ -81,9 +82,9 @@ struct ServiceProcessState::StateData |
struct sigaction old_action; |
bool set_action; |
- protected: |
- friend class base::RefCountedThreadSafe<ServiceProcessState::StateData>; |
- virtual ~StateData(); |
+ // The SingleThreadTaskRunner on which SignalReady and the destructor are |
+ // invoked. |
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner; |
}; |
#endif // CHROME_COMMON_SERVICE_PROCESS_UTIL_POSIX_H_ |