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

Unified Diff: remoting/base/tracer.h

Issue 3814013: FBTF: Monster ctor patch after changing heuristics in clang plugin. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: More add file fail 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/encoder_zlib.cc ('k') | remoting/base/tracer.cc » ('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 86be35ddfde808b6821747b23cf512ae75b150c3..6a23256181ccda48843db8231fb3549a829cb149 100644
--- a/remoting/base/tracer.h
+++ b/remoting/base/tracer.h
@@ -58,7 +58,6 @@
#include "base/singleton.h"
#include "base/task.h"
#include "base/scoped_ptr.h"
-#include "base/thread_local.h"
#include "remoting/base/protocol/trace.pb.h"
namespace remoting {
@@ -92,40 +91,24 @@ class Tracer : public base::RefCountedThreadSafe<Tracer> {
class TraceContext {
public:
// Get the current tracer.
- static Tracer* tracer() {
- return Get()->GetTracerInternal();
- }
+ static Tracer* tracer();
- static void PushTracer(Tracer* tracer) {
- Get()->PushTracerInternal(tracer);
- }
+ static void PushTracer(Tracer* tracer);
- static void PopTracer() {
- Get()->PopTracerInternal();
- }
+ static void PopTracer();
- static TraceContext* Get() {
- TraceContext* context =
- Singleton<base::ThreadLocalPointer<TraceContext> >::get()->Get();
- if (context == NULL) {
- context = new TraceContext();
- context->PushTracerInternal(new Tracer("default", 0.0));
- Singleton<base::ThreadLocalPointer<TraceContext> >::get()->Set(context);
- }
- return context;
- }
+ static TraceContext* Get();
private:
- TraceContext() {
- }
+ TraceContext();
- ~TraceContext() {}
+ ~TraceContext();
- void PushTracerInternal(Tracer* tracer) { tracers_.push_back(tracer); }
+ void PushTracerInternal(Tracer* tracer);
- void PopTracerInternal() { tracers_.pop_back(); }
+ void PopTracerInternal();
- Tracer* GetTracerInternal() { return tracers_.back(); }
+ Tracer* GetTracerInternal();
std::vector<scoped_refptr<Tracer> > tracers_;
« no previous file with comments | « remoting/base/encoder_zlib.cc ('k') | remoting/base/tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698