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 29 matching lines...) Expand all Loading... |
40 public: | 40 public: |
41 | 41 |
42 enum { | 42 enum { |
43 kTerminateMessage = 0xdecea5e | 43 kTerminateMessage = 0xdecea5e |
44 }; | 44 }; |
45 | 45 |
46 explicit ServiceProcessTerminateMonitor(const base::Closure& terminate_task); | 46 explicit ServiceProcessTerminateMonitor(const base::Closure& terminate_task); |
47 virtual ~ServiceProcessTerminateMonitor(); | 47 virtual ~ServiceProcessTerminateMonitor(); |
48 | 48 |
49 // MessageLoopForIO::Watcher overrides | 49 // MessageLoopForIO::Watcher overrides |
50 virtual void OnFileCanReadWithoutBlocking(int fd); | 50 virtual void OnFileCanReadWithoutBlocking(int fd) OVERRIDE; |
51 virtual void OnFileCanWriteWithoutBlocking(int fd); | 51 virtual void OnFileCanWriteWithoutBlocking(int fd) OVERRIDE; |
52 | 52 |
53 private: | 53 private: |
54 base::Closure terminate_task_; | 54 base::Closure terminate_task_; |
55 }; | 55 }; |
56 | 56 |
57 struct ServiceProcessState::StateData | 57 struct ServiceProcessState::StateData |
58 : public base::RefCountedThreadSafe<ServiceProcessState::StateData> { | 58 : public base::RefCountedThreadSafe<ServiceProcessState::StateData> { |
59 StateData(); | 59 StateData(); |
60 | 60 |
61 // WatchFileDescriptor needs to be set up by the thread that is going | 61 // WatchFileDescriptor needs to be set up by the thread that is going |
(...skipping 19 matching lines...) Expand all Loading... |
81 int sockets_[2]; | 81 int sockets_[2]; |
82 struct sigaction old_action_; | 82 struct sigaction old_action_; |
83 bool set_action_; | 83 bool set_action_; |
84 | 84 |
85 protected: | 85 protected: |
86 friend class base::RefCountedThreadSafe<ServiceProcessState::StateData>; | 86 friend class base::RefCountedThreadSafe<ServiceProcessState::StateData>; |
87 virtual ~StateData(); | 87 virtual ~StateData(); |
88 }; | 88 }; |
89 | 89 |
90 #endif // CHROME_COMMON_SERVICE_PROCESS_UTIL_POSIX_H_ | 90 #endif // CHROME_COMMON_SERVICE_PROCESS_UTIL_POSIX_H_ |
OLD | NEW |