summaryrefslogtreecommitdiffstats
path: root/chrome/browser/file_system
diff options
context:
space:
mode:
authordumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-27 21:22:01 +0000
committerdumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-27 21:22:01 +0000
commited7ae173fbca0de5cb95c990fed727ea15172cd4 (patch)
treee94ae0632eec0d649dad8fa1953cf0932c35cbda /chrome/browser/file_system
parent6783d72a34e5d25655d5c9d054f2700f3d2488ff (diff)
downloadchromium_src-ed7ae173fbca0de5cb95c990fed727ea15172cd4.zip
chromium_src-ed7ae173fbca0de5cb95c990fed727ea15172cd4.tar.gz
chromium_src-ed7ae173fbca0de5cb95c990fed727ea15172cd4.tar.bz2
Adding a TouchFile() operation.
BUG=none TEST=none Review URL: http://codereview.chromium.org/3417018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60710 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/file_system')
-rw-r--r--chrome/browser/file_system/file_system_dispatcher_host.cc12
-rw-r--r--chrome/browser/file_system/file_system_dispatcher_host.h8
2 files changed, 20 insertions, 0 deletions
diff --git a/chrome/browser/file_system/file_system_dispatcher_host.cc b/chrome/browser/file_system/file_system_dispatcher_host.cc
index 324612d..18daec8 100644
--- a/chrome/browser/file_system/file_system_dispatcher_host.cc
+++ b/chrome/browser/file_system/file_system_dispatcher_host.cc
@@ -110,6 +110,7 @@ bool FileSystemDispatcherHost::OnMessageReceived(
IPC_MESSAGE_HANDLER(ViewHostMsg_FileSystem_ReadDirectory, OnReadDirectory)
IPC_MESSAGE_HANDLER(ViewHostMsg_FileSystem_Write, OnWrite)
IPC_MESSAGE_HANDLER(ViewHostMsg_FileSystem_Truncate, OnTruncate)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_FileSystem_TouchFile, OnTouchFile)
IPC_MESSAGE_HANDLER(ViewHostMsg_FileSystem_CancelWrite, OnCancel)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP_EX()
@@ -220,6 +221,17 @@ void FileSystemDispatcherHost::OnTruncate(
GetNewOperation(request_id)->Truncate(path, length);
}
+void FileSystemDispatcherHost::OnTouchFile(
+ int request_id,
+ const FilePath& path,
+ const base::Time& last_access_time,
+ const base::Time& last_modified_time) {
+ if (!CheckValidFileSystemPath(path, request_id))
+ return;
+ GetNewOperation(request_id)->TouchFile(
+ path, last_access_time, last_modified_time);
+}
+
void FileSystemDispatcherHost::OnCancel(
int request_id,
int request_id_to_cancel) {
diff --git a/chrome/browser/file_system/file_system_dispatcher_host.h b/chrome/browser/file_system/file_system_dispatcher_host.h
index 20bb77c..22a560a 100644
--- a/chrome/browser/file_system/file_system_dispatcher_host.h
+++ b/chrome/browser/file_system/file_system_dispatcher_host.h
@@ -17,6 +17,10 @@
#include "webkit/fileapi/file_system_operation.h"
#include "webkit/fileapi/file_system_types.h"
+namespace base {
+class Time;
+}
+
class ChromeFileSystemOperation;
class FileSystemHostContext;
class GURL;
@@ -60,6 +64,10 @@ class FileSystemDispatcherHost
const GURL& blob_url,
int64 offset);
void OnTruncate(int request_id, const FilePath& path, int64 length);
+ void OnTouchFile(int request_id,
+ const FilePath& path,
+ const base::Time& last_access_time,
+ const base::Time& last_modified_time);
void OnCancel(int request_id, int request_to_cancel);
void Send(IPC::Message* message);
void RemoveCompletedOperation(int request_id);