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

Side by Side Diff: remoting/base/tracer.cc

Issue 6609008: Change other usages of .size() to .empty() when applicable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter nits Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « remoting/base/compound_buffer.cc ('k') | remoting/jingle_glue/jingle_thread.cc » ('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) 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/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 void PrintLogs() { 70 void PrintLogs() {
71 while(!stopped_) { 71 while(!stopped_) {
72 TraceBuffer* buffer = NULL; 72 TraceBuffer* buffer = NULL;
73 { 73 {
74 base::AutoLock l(lock_); 74 base::AutoLock l(lock_);
75 if (buffers_.empty()) { 75 if (buffers_.empty()) {
76 wake_.Wait(); 76 wake_.Wait();
77 } 77 }
78 // Check again since we might have woken for a stop signal. 78 // Check again since we might have woken for a stop signal.
79 if (buffers_.size() != 0) { 79 if (!buffers_.empty()) {
80 buffer = buffers_.back(); 80 buffer = buffers_.back();
81 buffers_.pop_back(); 81 buffers_.pop_back();
82 } 82 }
83 } 83 }
84 84
85 if (buffer) { 85 if (buffer) {
86 LogOneTrace(buffer); 86 LogOneTrace(buffer);
87 delete buffer; 87 delete buffer;
88 } 88 }
89 } 89 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 } 183 }
184 184
185 void TraceContext::PopTracerInternal() { tracers_.pop_back(); } 185 void TraceContext::PopTracerInternal() { tracers_.pop_back(); }
186 186
187 Tracer* TraceContext::GetTracerInternal() { return tracers_.back(); } 187 Tracer* TraceContext::GetTracerInternal() { return tracers_.back(); }
188 188
189 189
190 } // namespace remoting 190 } // namespace remoting
191 191
192 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::OutputLogger); 192 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::OutputLogger);
OLDNEW
« no previous file with comments | « remoting/base/compound_buffer.cc ('k') | remoting/jingle_glue/jingle_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698