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

Unified Diff: base/file_util_proxy.cc

Issue 11369061: Disassociate argument type from return type in PostTaskAndReplyWithResult template. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't rely on PTARWR allowing a null reply. Created 8 years, 1 month 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 | « no previous file | base/task_runner_util.h » ('j') | base/task_runner_util.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_proxy.cc
diff --git a/base/file_util_proxy.cc b/base/file_util_proxy.cc
index 290279ef3e20823760e72ed3fefb5abc5a8b7246..a193b4bc00d6b801dc125f68724a0e4e2ac55095 100644
--- a/base/file_util_proxy.cc
+++ b/base/file_util_proxy.cc
@@ -405,8 +405,13 @@ bool FileUtilProxy::RelayFileTask(
const tracked_objects::Location& from_here,
const FileTask& file_task,
const StatusCallback& callback) {
- return base::PostTaskAndReplyWithResult(
- task_runner, from_here, file_task, callback);
+ if (callback.is_null()) {
+ return task_runner->PostTask(from_here,
+ base::Bind(base::IgnoreResult(file_task)));
+ } else {
+ return base::PostTaskAndReplyWithResult(task_runner, from_here, file_task,
+ callback);
+ }
}
// static
« no previous file with comments | « no previous file | base/task_runner_util.h » ('j') | base/task_runner_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698