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

Side by Side Diff: webkit/fileapi/syncable/canned_syncable_file_system.h

Issue 11363161: Add CannedSyncableFileSystem::TouchFile for testing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef WEBKIT_FILEAPI_SYNCABLE_CANNED_SYNCABLE_FILE_SYSTEM_H_ 5 #ifndef WEBKIT_FILEAPI_SYNCABLE_CANNED_SYNCABLE_FILE_SYSTEM_H_
6 #define WEBKIT_FILEAPI_SYNCABLE_CANNED_SYNCABLE_FILE_SYSTEM_H_ 6 #define WEBKIT_FILEAPI_SYNCABLE_CANNED_SYNCABLE_FILE_SYSTEM_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // OpenFileSystem() must have been called before calling any of them. 93 // OpenFileSystem() must have been called before calling any of them.
94 // They create an operation and run it on IO task runner, and the operation 94 // They create an operation and run it on IO task runner, and the operation
95 // posts a task on file runner. 95 // posts a task on file runner.
96 base::PlatformFileError CreateDirectory(const FileSystemURL& url); 96 base::PlatformFileError CreateDirectory(const FileSystemURL& url);
97 base::PlatformFileError CreateFile(const FileSystemURL& url); 97 base::PlatformFileError CreateFile(const FileSystemURL& url);
98 base::PlatformFileError Copy(const FileSystemURL& src_url, 98 base::PlatformFileError Copy(const FileSystemURL& src_url,
99 const FileSystemURL& dest_url); 99 const FileSystemURL& dest_url);
100 base::PlatformFileError Move(const FileSystemURL& src_url, 100 base::PlatformFileError Move(const FileSystemURL& src_url,
101 const FileSystemURL& dest_url); 101 const FileSystemURL& dest_url);
102 base::PlatformFileError TruncateFile(const FileSystemURL& url, int64 size); 102 base::PlatformFileError TruncateFile(const FileSystemURL& url, int64 size);
103 base::PlatformFileError TouchFile(const FileSystemURL& url,
104 const base::Time& access_time,
105 const base::Time& modified_time);
nhiroki 2012/11/09 07:50:03 naming-nit: I'd prefer "last_access_time" and "las
kinuko 2012/11/09 07:55:33 Done.
103 base::PlatformFileError Remove(const FileSystemURL& url, bool recursive); 106 base::PlatformFileError Remove(const FileSystemURL& url, bool recursive);
104 base::PlatformFileError FileExists(const FileSystemURL& url); 107 base::PlatformFileError FileExists(const FileSystemURL& url);
105 base::PlatformFileError DirectoryExists(const FileSystemURL& url); 108 base::PlatformFileError DirectoryExists(const FileSystemURL& url);
106 base::PlatformFileError VerifyFile(const FileSystemURL& url, 109 base::PlatformFileError VerifyFile(const FileSystemURL& url,
107 const std::string& expected_data); 110 const std::string& expected_data);
108 111
109 // Returns the # of bytes written (>=0) or an error code (<0). 112 // Returns the # of bytes written (>=0) or an error code (<0).
110 int64 Write(net::URLRequestContext* url_request_context, 113 int64 Write(net::URLRequestContext* url_request_context,
111 const FileSystemURL& url, const GURL& blob_url); 114 const FileSystemURL& url, const GURL& blob_url);
112 int64 WriteString(const FileSystemURL& url, const std::string& data); 115 int64 WriteString(const FileSystemURL& url, const std::string& data);
(...skipping 25 matching lines...) Expand all
138 const StatusCallback& callback); 141 const StatusCallback& callback);
139 void DoCopy(const FileSystemURL& src_url, 142 void DoCopy(const FileSystemURL& src_url,
140 const FileSystemURL& dest_url, 143 const FileSystemURL& dest_url,
141 const StatusCallback& callback); 144 const StatusCallback& callback);
142 void DoMove(const FileSystemURL& src_url, 145 void DoMove(const FileSystemURL& src_url,
143 const FileSystemURL& dest_url, 146 const FileSystemURL& dest_url,
144 const StatusCallback& callback); 147 const StatusCallback& callback);
145 void DoTruncateFile(const FileSystemURL& url, 148 void DoTruncateFile(const FileSystemURL& url,
146 int64 size, 149 int64 size,
147 const StatusCallback& callback); 150 const StatusCallback& callback);
151 void DoTouchFile(const FileSystemURL& url,
152 const base::Time& access_time,
153 const base::Time& modified_time,
nhiroki 2012/11/09 07:50:03 ditto
kinuko 2012/11/09 07:55:33 Done.
154 const StatusCallback& callback);
148 void DoRemove(const FileSystemURL& url, 155 void DoRemove(const FileSystemURL& url,
149 bool recursive, 156 bool recursive,
150 const StatusCallback& callback); 157 const StatusCallback& callback);
151 void DoFileExists(const FileSystemURL& url, 158 void DoFileExists(const FileSystemURL& url,
152 const StatusCallback& callback); 159 const StatusCallback& callback);
153 void DoDirectoryExists(const FileSystemURL& url, 160 void DoDirectoryExists(const FileSystemURL& url,
154 const StatusCallback& callback); 161 const StatusCallback& callback);
155 void DoVerifyFile(const FileSystemURL& url, 162 void DoVerifyFile(const FileSystemURL& url,
156 const std::string& expected_data, 163 const std::string& expected_data,
157 const StatusCallback& callback); 164 const StatusCallback& callback);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 bool is_filesystem_opened_; 200 bool is_filesystem_opened_;
194 201
195 scoped_refptr<ObserverList> sync_status_observers_; 202 scoped_refptr<ObserverList> sync_status_observers_;
196 203
197 DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem); 204 DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem);
198 }; 205 };
199 206
200 } // namespace fileapi 207 } // namespace fileapi
201 208
202 #endif // WEBKIT_FILEAPI_SYNCABLE_CANNED_SYNCABLE_FILE_SYSTEM_H_ 209 #endif // WEBKIT_FILEAPI_SYNCABLE_CANNED_SYNCABLE_FILE_SYSTEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698