OLD | NEW |
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 Loading... |
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 |
OLD | NEW |