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

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

Issue 2828913003: Replace "nested message loop" with "nested run loop" in comments. (Closed)
Patch Set: rebase Created 3 years, 7 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') | base/message_loop/message_pump_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 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 } 411 }
412 412
413 bool MessageLoop::DeferOrRunPendingTask(PendingTask pending_task) { 413 bool MessageLoop::DeferOrRunPendingTask(PendingTask pending_task) {
414 if (pending_task.nestable || !is_nested_) { 414 if (pending_task.nestable || !is_nested_) {
415 RunTask(&pending_task); 415 RunTask(&pending_task);
416 // Show that we ran a task (Note: a new one might arrive as a 416 // Show that we ran a task (Note: a new one might arrive as a
417 // consequence!). 417 // consequence!).
418 return true; 418 return true;
419 } 419 }
420 420
421 // We couldn't run the task now because we're in a nested message loop 421 // We couldn't run the task now because we're in a nested run loop
422 // and the task isn't nestable. 422 // and the task isn't nestable.
423 deferred_non_nestable_work_queue_.push(std::move(pending_task)); 423 deferred_non_nestable_work_queue_.push(std::move(pending_task));
424 return false; 424 return false;
425 } 425 }
426 426
427 void MessageLoop::AddToDelayedWorkQueue(PendingTask pending_task) { 427 void MessageLoop::AddToDelayedWorkQueue(PendingTask pending_task) {
428 // Move to the delayed work queue. 428 // Move to the delayed work queue.
429 delayed_work_queue_.push(std::move(pending_task)); 429 delayed_work_queue_.push(std::move(pending_task));
430 } 430 }
431 431
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 persistent, 642 persistent,
643 mode, 643 mode,
644 controller, 644 controller,
645 delegate); 645 delegate);
646 } 646 }
647 #endif 647 #endif
648 648
649 #endif // !defined(OS_NACL_SFI) 649 #endif // !defined(OS_NACL_SFI)
650 650
651 } // namespace base 651 } // namespace base
OLDNEW
« no previous file with comments | « base/message_loop/message_loop.h ('k') | base/message_loop/message_pump_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698