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

Side by Side Diff: remoting/jingle_glue/jingle_thread.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/tracer.cc ('k') | views/controls/tabbed_pane/native_tabbed_pane_win.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/jingle_glue/jingle_thread.h" 5 #include "remoting/jingle_glue/jingle_thread.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_pump.h" 9 #include "base/message_pump.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // Returns task pump if the thread is running, otherwise NULL is returned. 156 // Returns task pump if the thread is running, otherwise NULL is returned.
157 TaskPump* JingleThread::task_pump() { 157 TaskPump* JingleThread::task_pump() {
158 return task_pump_; 158 return task_pump_;
159 } 159 }
160 160
161 void JingleThread::OnMessage(talk_base::Message* msg) { 161 void JingleThread::OnMessage(talk_base::Message* msg) {
162 DCHECK(msg->message_id == kStopMessageId); 162 DCHECK(msg->message_id == kStopMessageId);
163 163
164 // Stop the thread only if there are no more messages left in the queue, 164 // Stop the thread only if there are no more messages left in the queue,
165 // otherwise post another task to try again later. 165 // otherwise post another task to try again later.
166 if (msgq_.size() > 0 || fPeekKeep_) { 166 if (!msgq_.empty() || fPeekKeep_) {
167 Post(this, kStopMessageId); 167 Post(this, kStopMessageId);
168 } else { 168 } else {
169 MessageQueue::Quit(); 169 MessageQueue::Quit();
170 } 170 }
171 } 171 }
172 172
173 } // namespace remoting 173 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/base/tracer.cc ('k') | views/controls/tabbed_pane/native_tabbed_pane_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698