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

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

Issue 6602049: Pure pedantry: Replace all ".size() == 0" with ".empty()". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 last_timestamp = timestamp; 66 last_timestamp = timestamp;
67 } 67 }
68 } 68 }
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_.size() == 0) { 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_.size() != 0) {
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) {
(...skipping 97 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

Powered by Google App Engine
This is Rietveld 408576698