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

Side by Side Diff: base/message_loop/message_loop.cc

Issue 2356383003: Delete MessageLoop::Run()/RunUntilIdle(). (Closed)
Patch Set: rebase Created 4 years, 2 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
« no previous file with comments | « base/message_loop/message_loop.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 void MessageLoop::AddNestingObserver(NestingObserver* observer) { 265 void MessageLoop::AddNestingObserver(NestingObserver* observer) {
266 DCHECK_EQ(this, current()); 266 DCHECK_EQ(this, current());
267 nesting_observers_.AddObserver(observer); 267 nesting_observers_.AddObserver(observer);
268 } 268 }
269 269
270 void MessageLoop::RemoveNestingObserver(NestingObserver* observer) { 270 void MessageLoop::RemoveNestingObserver(NestingObserver* observer) {
271 DCHECK_EQ(this, current()); 271 DCHECK_EQ(this, current());
272 nesting_observers_.RemoveObserver(observer); 272 nesting_observers_.RemoveObserver(observer);
273 } 273 }
274 274
275 void MessageLoop::Run() {
276 DCHECK(pump_);
277 RunLoop run_loop;
278 run_loop.Run();
279 }
280
281 void MessageLoop::RunUntilIdle() {
282 DCHECK(pump_);
283 RunLoop run_loop;
284 run_loop.RunUntilIdle();
285 }
286
287 void MessageLoop::QuitWhenIdle() { 275 void MessageLoop::QuitWhenIdle() {
288 DCHECK_EQ(this, current()); 276 DCHECK_EQ(this, current());
289 if (run_loop_) { 277 if (run_loop_) {
290 run_loop_->QuitWhenIdle(); 278 run_loop_->QuitWhenIdle();
291 } else { 279 } else {
292 NOTREACHED() << "Must be inside Run to call QuitWhenIdle"; 280 NOTREACHED() << "Must be inside Run to call QuitWhenIdle";
293 } 281 }
294 } 282 }
295 283
296 void MessageLoop::QuitNow() { 284 void MessageLoop::QuitNow() {
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 persistent, 729 persistent,
742 mode, 730 mode,
743 controller, 731 controller,
744 delegate); 732 delegate);
745 } 733 }
746 #endif 734 #endif
747 735
748 #endif // !defined(OS_NACL_SFI) 736 #endif // !defined(OS_NACL_SFI)
749 737
750 } // namespace base 738 } // namespace base
OLDNEW
« no previous file with comments | « base/message_loop/message_loop.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698