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

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

Issue 1255673004: Proof-reading comments in base/message_loop/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: imcoming -> incoming Created 5 years, 5 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 | « no previous file | base/message_loop/message_loop.h » ('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/incoming_task_queue.h" 5 #include "base/message_loop/incoming_task_queue.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 // This should only be called while the lock is taken. 141 // This should only be called while the lock is taken.
142 incoming_queue_lock_.AssertAcquired(); 142 incoming_queue_lock_.AssertAcquired();
143 143
144 if (!message_loop_) { 144 if (!message_loop_) {
145 pending_task->task.Reset(); 145 pending_task->task.Reset();
146 return false; 146 return false;
147 } 147 }
148 148
149 // Initialize the sequence number. The sequence number is used for delayed 149 // Initialize the sequence number. The sequence number is used for delayed
150 // tasks (to faciliate FIFO sorting when two tasks have the same 150 // tasks (to facilitate FIFO sorting when two tasks have the same
151 // delayed_run_time value) and for identifying the task in about:tracing. 151 // delayed_run_time value) and for identifying the task in about:tracing.
152 pending_task->sequence_num = next_sequence_num_++; 152 pending_task->sequence_num = next_sequence_num_++;
153 153
154 message_loop_->task_annotator()->DidQueueTask("MessageLoop::PostTask", 154 message_loop_->task_annotator()->DidQueueTask("MessageLoop::PostTask",
155 *pending_task); 155 *pending_task);
156 156
157 bool was_empty = incoming_queue_.empty(); 157 bool was_empty = incoming_queue_.empty();
158 incoming_queue_.push(*pending_task); 158 incoming_queue_.push(*pending_task);
159 pending_task->task.Reset(); 159 pending_task->task.Reset();
160 160
(...skipping 12 matching lines...) Expand all
173 // After we've scheduled the message loop, we do not need to do so again 173 // After we've scheduled the message loop, we do not need to do so again
174 // until we know it has processed all of the work in our queue and is 174 // until we know it has processed all of the work in our queue and is
175 // waiting for more work again. The message loop will always attempt to 175 // waiting for more work again. The message loop will always attempt to
176 // reload from the incoming queue before waiting again so we clear this flag 176 // reload from the incoming queue before waiting again so we clear this flag
177 // in ReloadWorkQueue(). 177 // in ReloadWorkQueue().
178 message_loop_scheduled_ = true; 178 message_loop_scheduled_ = true;
179 } 179 }
180 180
181 } // namespace internal 181 } // namespace internal
182 } // namespace base 182 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/message_loop/message_loop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698