OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_COMMON_SERVICE_PROCESS_UTIL_POSIX_H_ | 5 #ifndef CHROME_COMMON_SERVICE_PROCESS_UTIL_POSIX_H_ |
6 #define CHROME_COMMON_SERVICE_PROCESS_UTIL_POSIX_H_ | 6 #define CHROME_COMMON_SERVICE_PROCESS_UTIL_POSIX_H_ |
7 | 7 |
8 #include "service_process_util.h" | 8 #include "service_process_util.h" |
9 | 9 |
10 #include <signal.h> | 10 #include <signal.h> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // to be monitoring it. | 61 // to be monitoring it. |
62 void SignalReady(base::WaitableEvent* signal, bool* success); | 62 void SignalReady(base::WaitableEvent* signal, bool* success); |
63 | 63 |
64 | 64 |
65 // TODO(jhawkins): Either make this a class or rename these public member | 65 // TODO(jhawkins): Either make this a class or rename these public member |
66 // variables to remove the trailing underscore. | 66 // variables to remove the trailing underscore. |
67 | 67 |
68 #if defined(OS_MACOSX) | 68 #if defined(OS_MACOSX) |
69 bool WatchExecutable(); | 69 bool WatchExecutable(); |
70 | 70 |
71 base::mac::ScopedCFTypeRef<CFDictionaryRef> launchd_conf_; | 71 base::ScopedCFTypeRef<CFDictionaryRef> launchd_conf_; |
72 base::FilePathWatcher executable_watcher_; | 72 base::FilePathWatcher executable_watcher_; |
73 #endif // OS_MACOSX | 73 #endif // OS_MACOSX |
74 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 74 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
75 scoped_ptr<MultiProcessLock> initializing_lock_; | 75 scoped_ptr<MultiProcessLock> initializing_lock_; |
76 scoped_ptr<MultiProcessLock> running_lock_; | 76 scoped_ptr<MultiProcessLock> running_lock_; |
77 #endif | 77 #endif |
78 scoped_ptr<ServiceProcessTerminateMonitor> terminate_monitor_; | 78 scoped_ptr<ServiceProcessTerminateMonitor> terminate_monitor_; |
79 base::MessageLoopForIO::FileDescriptorWatcher watcher_; | 79 base::MessageLoopForIO::FileDescriptorWatcher watcher_; |
80 int sockets_[2]; | 80 int sockets_[2]; |
81 struct sigaction old_action_; | 81 struct sigaction old_action_; |
82 bool set_action_; | 82 bool set_action_; |
83 | 83 |
84 protected: | 84 protected: |
85 friend class base::RefCountedThreadSafe<ServiceProcessState::StateData>; | 85 friend class base::RefCountedThreadSafe<ServiceProcessState::StateData>; |
86 virtual ~StateData(); | 86 virtual ~StateData(); |
87 }; | 87 }; |
88 | 88 |
89 #endif // CHROME_COMMON_SERVICE_PROCESS_UTIL_POSIX_H_ | 89 #endif // CHROME_COMMON_SERVICE_PROCESS_UTIL_POSIX_H_ |
OLD | NEW |