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