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/test/base/tracing.h" | 5 #include "chrome/test/base/tracing.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | |
8 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
10 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
11 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
12 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
13 #include "base/timer/timer.h" | 12 #include "base/timer/timer.h" |
| 13 #include "base/trace_event/trace_event.h" |
14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
15 #include "content/public/browser/tracing_controller.h" | 15 #include "content/public/browser/tracing_controller.h" |
16 #include "content/public/test/test_utils.h" | 16 #include "content/public/test/test_utils.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 using content::BrowserThread; | 20 using content::BrowserThread; |
21 | 21 |
22 class StringTraceSink : public content::TracingController::TraceDataSink { | 22 class StringTraceSink : public content::TracingController::TraceDataSink { |
23 public: | 23 public: |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 bool WaitForWatchEvent(base::TimeDelta timeout) { | 181 bool WaitForWatchEvent(base::TimeDelta timeout) { |
182 return InProcessTraceController::GetInstance()->WaitForWatchEvent(timeout); | 182 return InProcessTraceController::GetInstance()->WaitForWatchEvent(timeout); |
183 } | 183 } |
184 | 184 |
185 bool EndTracing(std::string* json_trace_output) { | 185 bool EndTracing(std::string* json_trace_output) { |
186 return InProcessTraceController::GetInstance()->EndTracing(json_trace_output); | 186 return InProcessTraceController::GetInstance()->EndTracing(json_trace_output); |
187 } | 187 } |
188 | 188 |
189 } // namespace tracing | 189 } // namespace tracing |
190 | 190 |
OLD | NEW |