Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: base/threading/watchdog.cc

Issue 1128733002: Update from https://crrev.com/328418 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/threading/thread_unittest.cc ('k') | base/threading/worker_pool.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/threading/watchdog.h" 5 #include "base/threading/watchdog.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/threading/platform_thread.h" 10 #include "base/threading/platform_thread.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // Ignore race of two alarms/breaks going off at roughly the same time. 162 // Ignore race of two alarms/breaks going off at roughly the same time.
163 AutoLock static_lock(static_data->lock); 163 AutoLock static_lock(static_data->lock);
164 // This was a real debugger break. 164 // This was a real debugger break.
165 static_data->last_debugged_alarm_time = last_alarm_time; 165 static_data->last_debugged_alarm_time = last_alarm_time;
166 static_data->last_debugged_alarm_delay = last_alarm_delay; 166 static_data->last_debugged_alarm_delay = last_alarm_delay;
167 } 167 }
168 } 168 }
169 169
170 void Watchdog::ThreadDelegate::SetThreadName() const { 170 void Watchdog::ThreadDelegate::SetThreadName() const {
171 std::string name = watchdog_->thread_watched_name_ + " Watchdog"; 171 std::string name = watchdog_->thread_watched_name_ + " Watchdog";
172 PlatformThread::SetName(name.c_str()); 172 PlatformThread::SetName(name);
173 DVLOG(1) << "Watchdog active: " << name; 173 DVLOG(1) << "Watchdog active: " << name;
174 } 174 }
175 175
176 // static 176 // static
177 void Watchdog::ResetStaticData() { 177 void Watchdog::ResetStaticData() {
178 StaticData* static_data = g_static_data.Pointer(); 178 StaticData* static_data = g_static_data.Pointer();
179 AutoLock lock(static_data->lock); 179 AutoLock lock(static_data->lock);
180 static_data->last_debugged_alarm_time = TimeTicks(); 180 static_data->last_debugged_alarm_time = TimeTicks();
181 static_data->last_debugged_alarm_delay = TimeDelta(); 181 static_data->last_debugged_alarm_delay = TimeDelta();
182 } 182 }
183 183
184 } // namespace base 184 } // namespace base
OLDNEW
« no previous file with comments | « base/threading/thread_unittest.cc ('k') | base/threading/worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698