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

Unified Diff: base/message_loop.cc

Issue 8965072: Add function support for Sleep and MessageLoop with TimeDelta input. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix comment spacing. Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/message_loop.h ('k') | base/threading/platform_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop.cc
diff --git a/base/message_loop.cc b/base/message_loop.cc
index f272a8329a1f8843df6b81fc17b19766fe8e02a1..32b40616b3d9135638e2f106b4aebfd006e15166 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -272,6 +272,13 @@ void MessageLoop::PostDelayedTask(
AddToIncomingQueue(&pending_task);
}
+void MessageLoop::PostDelayedTask(
+ const tracked_objects::Location& from_here,
+ Task* task,
+ base::TimeDelta delay) {
+ PostDelayedTask(from_here, task, delay.InMillisecondsRoundedUp());
+}
+
void MessageLoop::PostNonNestableTask(
const tracked_objects::Location& from_here, Task* task) {
DCHECK(task);
@@ -296,6 +303,13 @@ void MessageLoop::PostNonNestableDelayedTask(
AddToIncomingQueue(&pending_task);
}
+void MessageLoop::PostNonNestableDelayedTask(
+ const tracked_objects::Location& from_here,
+ Task* task,
+ base::TimeDelta delay) {
+ PostNonNestableDelayedTask(from_here, task, delay.InMillisecondsRoundedUp());
+}
+
void MessageLoop::PostTask(
const tracked_objects::Location& from_here, const base::Closure& task) {
DCHECK(!task.is_null()) << from_here.ToString();
@@ -304,7 +318,8 @@ void MessageLoop::PostTask(
}
void MessageLoop::PostDelayedTask(
- const tracked_objects::Location& from_here, const base::Closure& task,
+ const tracked_objects::Location& from_here,
+ const base::Closure& task,
int64 delay_ms) {
DCHECK(!task.is_null()) << from_here.ToString();
PendingTask pending_task(from_here, task,
@@ -312,6 +327,13 @@ void MessageLoop::PostDelayedTask(
AddToIncomingQueue(&pending_task);
}
+void MessageLoop::PostDelayedTask(
+ const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ base::TimeDelta delay) {
+ PostDelayedTask(from_here, task, delay.InMillisecondsRoundedUp());
+}
+
void MessageLoop::PostNonNestableTask(
const tracked_objects::Location& from_here, const base::Closure& task) {
DCHECK(!task.is_null()) << from_here.ToString();
@@ -328,6 +350,13 @@ void MessageLoop::PostNonNestableDelayedTask(
AddToIncomingQueue(&pending_task);
}
+void MessageLoop::PostNonNestableDelayedTask(
+ const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ base::TimeDelta delay) {
+ PostNonNestableDelayedTask(from_here, task, delay.InMillisecondsRoundedUp());
+}
+
void MessageLoop::Run() {
AutoRunState save_state(this);
RunHandler();
« no previous file with comments | « base/message_loop.h ('k') | base/threading/platform_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698