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/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 } | 144 } |
145 } | 145 } |
146 | 146 |
147 void Timeout() { | 147 void Timeout() { |
148 DCHECK(is_waiting_on_watch_); | 148 DCHECK(is_waiting_on_watch_); |
149 message_loop_runner_->Quit(); | 149 message_loop_runner_->Quit(); |
150 } | 150 } |
151 | 151 |
152 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; | 152 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; |
153 | 153 |
154 base::OneShotTimer<InProcessTraceController> timer_; | 154 base::OneShotTimer timer_; |
155 | 155 |
156 bool is_waiting_on_watch_; | 156 bool is_waiting_on_watch_; |
157 int watch_notification_count_; | 157 int watch_notification_count_; |
158 | 158 |
159 DISALLOW_COPY_AND_ASSIGN(InProcessTraceController); | 159 DISALLOW_COPY_AND_ASSIGN(InProcessTraceController); |
160 }; | 160 }; |
161 | 161 |
162 } // namespace | 162 } // namespace |
163 | 163 |
164 namespace tracing { | 164 namespace tracing { |
(...skipping 14 matching lines...) Expand all Loading... |
179 bool WaitForWatchEvent(base::TimeDelta timeout) { | 179 bool WaitForWatchEvent(base::TimeDelta timeout) { |
180 return InProcessTraceController::GetInstance()->WaitForWatchEvent(timeout); | 180 return InProcessTraceController::GetInstance()->WaitForWatchEvent(timeout); |
181 } | 181 } |
182 | 182 |
183 bool EndTracing(std::string* json_trace_output) { | 183 bool EndTracing(std::string* json_trace_output) { |
184 return InProcessTraceController::GetInstance()->EndTracing(json_trace_output); | 184 return InProcessTraceController::GetInstance()->EndTracing(json_trace_output); |
185 } | 185 } |
186 | 186 |
187 } // namespace tracing | 187 } // namespace tracing |
188 | 188 |
OLD | NEW |