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

Unified Diff: components/drive/drive_api_util.cc

Issue 2842493004: Add OnceCallback support to PostTaskAndReplyWithResult (Closed)
Patch Set: s/can not/cannot/ Created 3 years, 8 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 | « components/drive/drive_api_util.h ('k') | content/public/browser/browser_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/drive/drive_api_util.cc
diff --git a/components/drive/drive_api_util.cc b/components/drive/drive_api_util.cc
index cf86511bc3974136d5ee8a63bd9f2f6d32427278..6b240aad130e2e72a4bb70616b02c56500159aba 100644
--- a/components/drive/drive_api_util.cc
+++ b/components/drive/drive_api_util.cc
@@ -18,6 +18,7 @@
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/synchronization/cancellation_flag.h"
+#include "base/task_runner_util.h"
#include "base/values.h"
#include "google_apis/drive/drive_api_parser.h"
#include "net/base/escape.h"
@@ -199,5 +200,13 @@ bool HasHostedDocumentExtension(const base::FilePath& path) {
return extension == kUnknownHostedDocumentExtension;
}
+void RunAsyncTask(base::TaskRunner* task_runner,
+ const tracked_objects::Location& from_here,
+ base::OnceCallback<FileError()> task,
+ base::OnceCallback<void(FileError)> reply) {
+ PostTaskAndReplyWithResult(task_runner, from_here, std::move(task),
+ std::move(reply));
+}
+
} // namespace util
} // namespace drive
« no previous file with comments | « components/drive/drive_api_util.h ('k') | content/public/browser/browser_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698