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

Unified Diff: webkit/fileapi/syncable/canned_syncable_file_system.cc

Issue 11363161: Add CannedSyncableFileSystem::TouchFile for testing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: namig fix Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/fileapi/syncable/canned_syncable_file_system.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/syncable/canned_syncable_file_system.cc
diff --git a/webkit/fileapi/syncable/canned_syncable_file_system.cc b/webkit/fileapi/syncable/canned_syncable_file_system.cc
index 6ba8c074ab887b7fd01d55d5db0e32d6a634de3e..b230e608b5853f383a52819452a4ff04c794dfb1 100644
--- a/webkit/fileapi/syncable/canned_syncable_file_system.cc
+++ b/webkit/fileapi/syncable/canned_syncable_file_system.cc
@@ -292,6 +292,18 @@ PlatformFileError CannedSyncableFileSystem::TruncateFile(
base::Unretained(this), url, size));
}
+PlatformFileError CannedSyncableFileSystem::TouchFile(
+ const FileSystemURL& url,
+ const base::Time& last_access_time,
+ const base::Time& last_modified_time) {
+ return RunOnThread<PlatformFileError>(
+ io_task_runner_,
+ FROM_HERE,
+ base::Bind(&CannedSyncableFileSystem::DoTouchFile,
+ base::Unretained(this), url,
+ last_access_time, last_modified_time));
+}
+
PlatformFileError CannedSyncableFileSystem::Remove(
const FileSystemURL& url, bool recursive) {
return RunOnThread<PlatformFileError>(
@@ -438,6 +450,16 @@ void CannedSyncableFileSystem::DoTruncateFile(
NewOperation()->Truncate(url, size, callback);
}
+void CannedSyncableFileSystem::DoTouchFile(
+ const FileSystemURL& url,
+ const base::Time& last_access_time,
+ const base::Time& last_modified_time,
+ const StatusCallback& callback) {
+ EXPECT_TRUE(is_filesystem_opened_);
+ NewOperation()->TouchFile(url, last_access_time,
+ last_modified_time, callback);
+}
+
void CannedSyncableFileSystem::DoRemove(
const FileSystemURL& url, bool recursive,
const StatusCallback& callback) {
« no previous file with comments | « webkit/fileapi/syncable/canned_syncable_file_system.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698