OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "remoting/base/tracer.h" | 5 #include "remoting/base/tracer.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/condition_variable.h" | 10 #include "base/condition_variable.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 Singleton<base::ThreadLocalPointer<TraceContext> >::get()->Set(context); | 165 Singleton<base::ThreadLocalPointer<TraceContext> >::get()->Set(context); |
166 } | 166 } |
167 return context; | 167 return context; |
168 } | 168 } |
169 | 169 |
170 TraceContext::TraceContext() {} | 170 TraceContext::TraceContext() {} |
171 | 171 |
172 TraceContext::~TraceContext() {} | 172 TraceContext::~TraceContext() {} |
173 | 173 |
174 void TraceContext::PushTracerInternal(Tracer* tracer) { | 174 void TraceContext::PushTracerInternal(Tracer* tracer) { |
175 tracers_.push_back(tracer); | 175 tracers_.push_back(make_scoped_refptr(tracer)); |
176 } | 176 } |
177 | 177 |
178 void TraceContext::PopTracerInternal() { tracers_.pop_back(); } | 178 void TraceContext::PopTracerInternal() { tracers_.pop_back(); } |
179 | 179 |
180 Tracer* TraceContext::GetTracerInternal() { return tracers_.back(); } | 180 Tracer* TraceContext::GetTracerInternal() { return tracers_.back(); } |
181 | 181 |
182 | 182 |
183 } // namespace remoting | 183 } // namespace remoting |
184 | 184 |
185 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::OutputLogger); | 185 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::OutputLogger); |
OLD | NEW |