OLD | NEW |
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 "extensions/common/one_shot_event.h" | 5 #include "extensions/common/one_shot_event.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/callback.h" | 9 #include "base/callback.h" |
8 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
9 #include "base/location.h" | 11 #include "base/location.h" |
10 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
11 #include "base/task_runner.h" | 13 #include "base/task_runner.h" |
12 #include "base/thread_task_runner_handle.h" | 14 #include "base/thread_task_runner_handle.h" |
13 #include "base/time/time.h" | 15 #include "base/time/time.h" |
14 | 16 |
15 using base::SingleThreadTaskRunner; | 17 using base::SingleThreadTaskRunner; |
16 | 18 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 if (delay != base::TimeDelta()) | 93 if (delay != base::TimeDelta()) |
92 runner->PostDelayedTask(from_here, task, delay); | 94 runner->PostDelayedTask(from_here, task, delay); |
93 else | 95 else |
94 runner->PostTask(from_here, task); | 96 runner->PostTask(from_here, task); |
95 } else { | 97 } else { |
96 tasks_.push_back(TaskInfo(from_here, runner, task, delay)); | 98 tasks_.push_back(TaskInfo(from_here, runner, task, delay)); |
97 } | 99 } |
98 } | 100 } |
99 | 101 |
100 } // namespace extensions | 102 } // namespace extensions |
OLD | NEW |