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 <inttypes.h> |
| 6 #include <stdbool.h> |
| 7 #include <stdio.h> |
| 8 #include <string> |
| 9 |
| 10 #include "base/base_paths.h" |
| 11 #include "base/basictypes.h" |
5 #include "base/debug/trace_event.h" | 12 #include "base/debug/trace_event.h" |
6 | |
7 #include "base/format_macros.h" | |
8 #include "base/file_path.h" | 13 #include "base/file_path.h" |
9 #include "base/file_util.h" | 14 #include "base/file_util.h" |
10 #include "base/path_service.h" | 15 #include "base/path_service.h" |
| 16 #include "base/process.h" |
11 #include "base/process_util.h" | 17 #include "base/process_util.h" |
| 18 #include "base/scoped_ptr.h" |
| 19 #include "base/singleton.h" |
12 #include "base/stringprintf.h" | 20 #include "base/stringprintf.h" |
| 21 #include "base/synchronization/lock.h" |
13 #include "base/threading/platform_thread.h" | 22 #include "base/threading/platform_thread.h" |
| 23 #include "base/time.h" |
| 24 #include "base/timer.h" |
14 #include "base/utf_string_conversions.h" | 25 #include "base/utf_string_conversions.h" |
15 #include "base/time.h" | 26 #include "build/build_config.h" |
16 | 27 |
17 #define USE_UNRELIABLE_NOW | 28 #define USE_UNRELIABLE_NOW |
18 | 29 |
19 namespace base { | 30 namespace base { |
20 namespace debug { | 31 namespace debug { |
21 | 32 |
22 static const char* kEventTypeNames[] = { | 33 static const char* kEventTypeNames[] = { |
23 "BEGIN", | 34 "BEGIN", |
24 "END", | 35 "END", |
25 "INSTANT" | 36 "INSTANT" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 } | 170 } |
160 | 171 |
161 void TraceLog::Log(const std::string& msg) { | 172 void TraceLog::Log(const std::string& msg) { |
162 AutoLock lock(file_lock_); | 173 AutoLock lock(file_lock_); |
163 | 174 |
164 fprintf(log_file_, "%s", msg.c_str()); | 175 fprintf(log_file_, "%s", msg.c_str()); |
165 } | 176 } |
166 | 177 |
167 } // namespace debug | 178 } // namespace debug |
168 } // namespace base | 179 } // namespace base |
OLD | NEW |