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

Side by Side Diff: remoting/jingle_glue/jingle_thread.cc

Issue 8889024: Removing MessageLoop::QuitTask() from remoting/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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/host/screen_recorder_unittest.cc ('k') | remoting/protocol/jingle_session_unittest.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "base/message_pump.h" 10 #include "base/message_pump.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 message_loop.Run(); 165 message_loop.Run();
166 166
167 stopped_event_.Signal(); 167 stopped_event_.Signal();
168 168
169 task_pump_ = NULL; 169 task_pump_ = NULL;
170 message_loop_ = NULL; 170 message_loop_ = NULL;
171 } 171 }
172 172
173 void JingleThread::Stop() { 173 void JingleThread::Stop() {
174 message_loop_->PostTask(FROM_HERE, new MessageLoop::QuitTask()); 174 message_loop_->PostTask(FROM_HERE, MessageLoop::QuitClosure());
175 stopped_event_.Wait(); 175 stopped_event_.Wait();
176 176
177 // This will wait until the thread is actually finished. 177 // This will wait until the thread is actually finished.
178 Thread::Stop(); 178 Thread::Stop();
179 } 179 }
180 180
181 MessageLoop* JingleThread::message_loop() { 181 MessageLoop* JingleThread::message_loop() {
182 return message_loop_; 182 return message_loop_;
183 } 183 }
184 184
185 base::MessageLoopProxy* JingleThread::message_loop_proxy() { 185 base::MessageLoopProxy* JingleThread::message_loop_proxy() {
186 return message_loop_proxy_; 186 return message_loop_proxy_;
187 } 187 }
188 188
189 TaskPump* JingleThread::task_pump() { 189 TaskPump* JingleThread::task_pump() {
190 return task_pump_; 190 return task_pump_;
191 } 191 }
192 192
193 } // namespace remoting 193 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/screen_recorder_unittest.cc ('k') | remoting/protocol/jingle_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698