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

Side by Side Diff: base/files/file_util_proxy.cc

Issue 2122543002: Replace Closure in TaskRunner::PostTask with OneShotCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@07_oneshot
Patch Set: fix Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « base/deferred_sequenced_task_runner.cc ('k') | base/files/important_file_writer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/files/file_util_proxy.h" 5 #include "base/files/file_util_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 Unretained(helper), file_path), 76 Unretained(helper), file_path),
77 Bind(&GetFileInfoHelper::Reply, Owned(helper), callback)); 77 Bind(&GetFileInfoHelper::Reply, Owned(helper), callback));
78 } 78 }
79 79
80 // static 80 // static
81 bool FileUtilProxy::DeleteFile(TaskRunner* task_runner, 81 bool FileUtilProxy::DeleteFile(TaskRunner* task_runner,
82 const FilePath& file_path, 82 const FilePath& file_path,
83 bool recursive, 83 bool recursive,
84 const StatusCallback& callback) { 84 const StatusCallback& callback) {
85 return base::PostTaskAndReplyWithResult( 85 return base::PostTaskAndReplyWithResult(
86 task_runner, FROM_HERE, 86 task_runner, FROM_HERE, BindOnce(&DeleteAdapter, file_path, recursive),
87 Bind(&DeleteAdapter, file_path, recursive),
88 callback); 87 callback);
89 } 88 }
90 89
91 // static 90 // static
92 bool FileUtilProxy::Touch( 91 bool FileUtilProxy::Touch(
93 TaskRunner* task_runner, 92 TaskRunner* task_runner,
94 const FilePath& file_path, 93 const FilePath& file_path,
95 const Time& last_access_time, 94 const Time& last_access_time,
96 const Time& last_modified_time, 95 const Time& last_modified_time,
97 const StatusCallback& callback) { 96 const StatusCallback& callback) {
98 return base::PostTaskAndReplyWithResult( 97 return base::PostTaskAndReplyWithResult(
99 task_runner, 98 task_runner,
100 FROM_HERE, 99 FROM_HERE,
101 Bind(&TouchFile, file_path, last_access_time, last_modified_time), 100 Bind(&TouchFile, file_path, last_access_time, last_modified_time),
102 Bind(&CallWithTranslatedParameter, callback)); 101 Bind(&CallWithTranslatedParameter, callback));
103 } 102 }
104 103
105 } // namespace base 104 } // namespace base
OLDNEW
« no previous file with comments | « base/deferred_sequenced_task_runner.cc ('k') | base/files/important_file_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698