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

Side by Side Diff: base/debug/debugger.cc

Issue 6410105: run iwyu on base! Base URL: svn://svn.chromium.org/chrome/trunk/src/base
Patch Set: Created 9 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « base/crypto/symmetric_key_mac.cc ('k') | base/debug/debugger_posix.cc » ('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) 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/debug/debugger.h" 5 #include "base/debug/debugger.h"
6
7 #include "base/threading/platform_thread.h" 6 #include "base/threading/platform_thread.h"
8 7
9 namespace base { 8 namespace base {
10 namespace debug { 9 namespace debug {
11 10
12 static bool is_debug_ui_suppressed = false; 11 static bool is_debug_ui_suppressed = false;
13 12
14 bool WaitForDebugger(int wait_seconds, bool silent) { 13 bool WaitForDebugger(int wait_seconds, bool silent) {
15 for (int i = 0; i < wait_seconds * 10; ++i) { 14 for (int i = 0; i < wait_seconds * 10; ++i) {
16 if (BeingDebugged()) { 15 if (BeingDebugged()) {
17 if (!silent) 16 if (!silent)
18 BreakDebugger(); 17 BreakDebugger();
19 return true; 18 return true;
20 } 19 }
21 PlatformThread::Sleep(100); 20 PlatformThread::Sleep(100);
22 } 21 }
23 return false; 22 return false;
24 } 23 }
25 24
26 void SetSuppressDebugUI(bool suppress) { 25 void SetSuppressDebugUI(bool suppress) {
27 is_debug_ui_suppressed = suppress; 26 is_debug_ui_suppressed = suppress;
28 } 27 }
29 28
30 bool IsDebugUISuppressed() { 29 bool IsDebugUISuppressed() {
31 return is_debug_ui_suppressed; 30 return is_debug_ui_suppressed;
32 } 31 }
33 32
34 } // namespace debug 33 } // namespace debug
35 } // namespace base 34 } // namespace base
OLDNEW
« no previous file with comments | « base/crypto/symmetric_key_mac.cc ('k') | base/debug/debugger_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698