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

Unified Diff: remoting/base/tracer.h

Issue 3305001: Move decoder into separate thread, clean up API layering, and redo update protocl (Closed)
Patch Set: Fix compile error. Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/base/protocol_decoder_unittest.cc ('k') | remoting/client/chromoting_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/tracer.h
diff --git a/remoting/base/tracer.h b/remoting/base/tracer.h
index 739648dca0d18557f62c2d8784eb92d219d960e1..86be35ddfde808b6821747b23cf512ae75b150c3 100644
--- a/remoting/base/tracer.h
+++ b/remoting/base/tracer.h
@@ -24,7 +24,7 @@
// void Decoder::StartDecode() {
// ScopedTracer tracer("decode_start");
//
-// TraceContext::current()->PrintString("Decode starting");
+// TraceContext::tracer()->PrintString("Decode starting");
//
// // DoDecode takes 2 parameters. The first is a callback invoked for each
// // finished frame of output. The second is invoked when the task is done.
@@ -34,12 +34,12 @@
// }
//
// void Decoder::OnFrameOutput() {
-// TraceContext::current()->PrintString("Frame outputed");
+// TraceContext::tracer()->PrintString("Frame outputed");
// ...
// }
//
// void Decoder::DecodeDone() {
-// TraceContext::current()->PrintString("decode done");
+// TraceContext::tracer()->PrintString("decode done");
// ...
// }
//
@@ -91,7 +91,7 @@ class Tracer : public base::RefCountedThreadSafe<Tracer> {
class TraceContext {
public:
- // Set the current tracer.
+ // Get the current tracer.
static Tracer* tracer() {
return Get()->GetTracerInternal();
}
@@ -142,12 +142,16 @@ class TraceContext {
class ScopedTracer {
public:
ScopedTracer(const std::string& name) {
+#if defined(USE_TRACE)
scoped_refptr<Tracer> tracer = new Tracer(name, 1.00);
TraceContext::PushTracer(tracer);
+#endif
}
~ScopedTracer() {
+#if defined(USE_TRACE)
TraceContext::PopTracer();
+#endif
}
};
« no previous file with comments | « remoting/base/protocol_decoder_unittest.cc ('k') | remoting/client/chromoting_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698