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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h

Issue 2637463002: Add an idle task to periodically sweep canceled delayed tasks (Closed)
Patch Set: Fix issue with tracked_objects::Location spotted by asan Created 3 years, 11 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 TaskQueueImpl* GetTaskQueueForTest() const { return task_queue_.get(); } 206 TaskQueueImpl* GetTaskQueueForTest() const { return task_queue_.get(); }
207 207
208 private: 208 private:
209 friend class TaskQueueImpl; 209 friend class TaskQueueImpl;
210 210
211 scoped_refptr<TaskQueueImpl> task_queue_; 211 scoped_refptr<TaskQueueImpl> task_queue_;
212 bool enabled_; 212 bool enabled_;
213 }; 213 };
214 214
215 // Iterates over |delayed_incoming_queue| removing canceled tasks.
216 void SweepCanceledDelayedTasks(base::TimeTicks now);
217
215 private: 218 private:
216 friend class WorkQueue; 219 friend class WorkQueue;
217 friend class WorkQueueTest; 220 friend class WorkQueueTest;
218 221
219 enum class TaskType { 222 enum class TaskType {
220 NORMAL, 223 NORMAL,
221 NON_NESTABLE, 224 NON_NESTABLE,
222 }; 225 };
223 226
224 struct AnyThread { 227 struct AnyThread {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 const bool should_report_when_execution_blocked_; 343 const bool should_report_when_execution_blocked_;
341 344
342 DISALLOW_COPY_AND_ASSIGN(TaskQueueImpl); 345 DISALLOW_COPY_AND_ASSIGN(TaskQueueImpl);
343 }; 346 };
344 347
345 } // namespace internal 348 } // namespace internal
346 } // namespace scheduler 349 } // namespace scheduler
347 } // namespace blink 350 } // namespace blink
348 351
349 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ 352 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/BUILD.gn ('k') | third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698