| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/common/service_process_util_posix.h" | 5 #include "chrome/common/service_process_util_posix.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/eintr_wrapper.h" | |
| 10 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
| 10 #include "base/posix/eintr_wrapper.h" |
| 11 #include "base/synchronization/waitable_event.h" | 11 #include "base/synchronization/waitable_event.h" |
| 12 #include "chrome/common/multi_process_lock.h" | 12 #include "chrome/common/multi_process_lock.h" |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 int g_signal_socket = -1; | 15 int g_signal_socket = -1; |
| 16 } | 16 } |
| 17 | 17 |
| 18 // Attempts to take a lock named |name|. If |waiting| is true then this will | 18 // Attempts to take a lock named |name|. If |waiting| is true then this will |
| 19 // make multiple attempts to acquire the lock. | 19 // make multiple attempts to acquire the lock. |
| 20 // Caller is responsible for ownership of the MultiProcessLock. | 20 // Caller is responsible for ownership of the MultiProcessLock. |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 signal_ready.Wait(); | 186 signal_ready.Wait(); |
| 187 return success; | 187 return success; |
| 188 } | 188 } |
| 189 | 189 |
| 190 void ServiceProcessState::TearDownState() { | 190 void ServiceProcessState::TearDownState() { |
| 191 if (state_) { | 191 if (state_) { |
| 192 state_->Release(); | 192 state_->Release(); |
| 193 state_ = NULL; | 193 state_ = NULL; |
| 194 } | 194 } |
| 195 } | 195 } |
| OLD | NEW |