OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/threading/watchdog.h" | 5 #include <string> |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/synchronization/condition_variable.h" |
| 10 #include "base/synchronization/lock.h" |
9 #include "base/threading/platform_thread.h" | 11 #include "base/threading/platform_thread.h" |
| 12 #include "base/threading/watchdog.h" |
| 13 #include "base/time.h" |
10 | 14 |
11 namespace base { | 15 namespace base { |
12 | 16 |
13 // Start thread running in a Disarmed state. | 17 // Start thread running in a Disarmed state. |
14 Watchdog::Watchdog(const TimeDelta& duration, | 18 Watchdog::Watchdog(const TimeDelta& duration, |
15 const std::string& thread_watched_name, | 19 const std::string& thread_watched_name, |
16 bool enabled) | 20 bool enabled) |
17 : init_successful_(false), | 21 : init_successful_(false), |
18 lock_(), | 22 lock_(), |
19 condition_variable_(&lock_), | 23 condition_variable_(&lock_), |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 } | 139 } |
136 | 140 |
137 // static | 141 // static |
138 Lock Watchdog::static_lock_; // Lock for access of static data... | 142 Lock Watchdog::static_lock_; // Lock for access of static data... |
139 // static | 143 // static |
140 TimeTicks Watchdog::last_debugged_alarm_time_ = TimeTicks(); | 144 TimeTicks Watchdog::last_debugged_alarm_time_ = TimeTicks(); |
141 // static | 145 // static |
142 TimeDelta Watchdog::last_debugged_alarm_delay_; | 146 TimeDelta Watchdog::last_debugged_alarm_delay_; |
143 | 147 |
144 } // namespace base | 148 } // namespace base |
OLD | NEW |