| Index: webkit/fileapi/file_system_operation.cc
|
| ===================================================================
|
| --- webkit/fileapi/file_system_operation.cc (revision 60236)
|
| +++ webkit/fileapi/file_system_operation.cc (working copy)
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "webkit/fileapi/file_system_operation.h"
|
|
|
| +#include "base/time.h"
|
| #include "webkit/fileapi/file_system_callback_dispatcher.h"
|
|
|
| namespace fileapi {
|
| @@ -125,6 +126,19 @@
|
| &FileSystemOperation::DidFinishFileOperation));
|
| }
|
|
|
| +void FileSystemOperation::TouchFile(const FilePath& path,
|
| + const base::Time& last_access_time,
|
| + const base::Time& last_modified_time) {
|
| +#ifndef NDEBUG
|
| + DCHECK(!operation_pending_);
|
| + operation_pending_ = true;
|
| +#endif
|
| +
|
| + base::FileUtilProxy::Touch(
|
| + proxy_, path, last_access_time, last_modified_time,
|
| + callback_factory_.NewCallback(&FileSystemOperation::DidTouchFile));
|
| +}
|
| +
|
| void FileSystemOperation::DidCreateFileExclusive(
|
| base::PlatformFileError rv,
|
| base::PassPlatformFile file,
|
| @@ -194,4 +208,11 @@
|
| dispatcher_->DidFail(rv);
|
| }
|
|
|
| +void FileSystemOperation::DidTouchFile(base::PlatformFileError rv) {
|
| + if (rv == base::PLATFORM_FILE_OK)
|
| + dispatcher_->DidSucceed();
|
| + else
|
| + dispatcher_->DidFail(rv);
|
| +}
|
| +
|
| } // namespace fileapi
|
|
|