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 "webkit/fileapi/file_system_file_util_proxy.h" | 5 #include "webkit/fileapi/file_system_file_util_proxy.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "webkit/fileapi/cross_file_util_helper.h" | 10 #include "webkit/fileapi/cross_file_util_helper.h" |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 const FileSystemPath& path, | 237 const FileSystemPath& path, |
238 const ReadDirectoryCallback& callback) { | 238 const ReadDirectoryCallback& callback) { |
239 ReadDirectoryHelper* helper = new ReadDirectoryHelper; | 239 ReadDirectoryHelper* helper = new ReadDirectoryHelper; |
240 return message_loop_proxy->PostTaskAndReply( | 240 return message_loop_proxy->PostTaskAndReply( |
241 FROM_HERE, | 241 FROM_HERE, |
242 Bind(&ReadDirectoryHelper::RunWork, Unretained(helper), | 242 Bind(&ReadDirectoryHelper::RunWork, Unretained(helper), |
243 file_util, context, path), | 243 file_util, context, path), |
244 Bind(&ReadDirectoryHelper::Reply, Owned(helper), callback)); | 244 Bind(&ReadDirectoryHelper::Reply, Owned(helper), callback)); |
245 } | 245 } |
246 | 246 |
247 // Touches a file by calling |file_util|'s FileSystemFileUtil::Touch | 247 // static |
248 // on the given |message_loop_proxy|. | |
249 bool FileSystemFileUtilProxy::Touch( | 248 bool FileSystemFileUtilProxy::Touch( |
250 MessageLoopProxy* message_loop_proxy, | 249 MessageLoopProxy* message_loop_proxy, |
251 FileSystemOperationContext* context, | 250 FileSystemOperationContext* context, |
252 FileSystemFileUtil* file_util, | 251 FileSystemFileUtil* file_util, |
253 const FileSystemPath& path, | 252 const FileSystemPath& path, |
254 const base::Time& last_access_time, | 253 const base::Time& last_access_time, |
255 const base::Time& last_modified_time, | 254 const base::Time& last_modified_time, |
256 const StatusCallback& callback) { | 255 const StatusCallback& callback) { |
257 return base::FileUtilProxy::RelayFileTask( | 256 return base::FileUtilProxy::RelayFileTask( |
258 message_loop_proxy, FROM_HERE, | 257 message_loop_proxy, FROM_HERE, |
(...skipping 11 matching lines...) Expand all Loading... |
270 int64 length, | 269 int64 length, |
271 const StatusCallback& callback) { | 270 const StatusCallback& callback) { |
272 return base::FileUtilProxy::RelayFileTask( | 271 return base::FileUtilProxy::RelayFileTask( |
273 message_loop_proxy, FROM_HERE, | 272 message_loop_proxy, FROM_HERE, |
274 base::Bind(&FileSystemFileUtil::Truncate, base::Unretained(file_util), | 273 base::Bind(&FileSystemFileUtil::Truncate, base::Unretained(file_util), |
275 context, path, length), | 274 context, path, length), |
276 callback); | 275 callback); |
277 } | 276 } |
278 | 277 |
279 } // namespace fileapi | 278 } // namespace fileapi |
OLD | NEW |