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