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

Side by Side Diff: chrome/test/base/tracing.cc

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 2 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 | « chrome/browser/upgrade_detector_impl.h ('k') | chrome/test/remoting/waiter.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 "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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/upgrade_detector_impl.h ('k') | chrome/test/remoting/waiter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698