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

Unified Diff: google_apis/drive/task_util.cc

Issue 408153003: Simplify RunTaskOnThread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix FileCacheTest Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « google_apis/drive/task_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/drive/task_util.cc
diff --git a/google_apis/drive/task_util.cc b/google_apis/drive/task_util.cc
index 420afacb8444ebeff9cfa904a2b089bbd2b0d9a8..6b2bbf4d1dae0445f071192f2d3704b7ecb0c43c 100644
--- a/google_apis/drive/task_util.cc
+++ b/google_apis/drive/task_util.cc
@@ -8,14 +8,10 @@
namespace google_apis {
-void RunTaskOnThread(scoped_refptr<base::SequencedTaskRunner> task_runner,
- const base::Closure& task) {
- if (task_runner->RunsTasksOnCurrentThread()) {
- task.Run();
- } else {
- const bool posted = task_runner->PostTask(FROM_HERE, task);
- DCHECK(posted);
- }
+void RunTaskWithTaskRunner(scoped_refptr<base::TaskRunner> task_runner,
+ const base::Closure& task) {
+ const bool posted = task_runner->PostTask(FROM_HERE, task);
+ DCHECK(posted);
}
} // namespace google_apis
« no previous file with comments | « google_apis/drive/task_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698