Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ASYNC_FILE_UTIL_TEST_HELPER_H_ | |
| 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ASYNC_FILE_UTIL_TEST_HELPER_H_ | |
| 7 | |
| 8 #include "base/memory/scoped_ptr.h" | |
| 9 #include "webkit/browser/fileapi/async_file_util.h" | |
| 10 | |
| 11 namespace chrome { | |
| 12 | |
| 13 // A helper class to perform async file operations in a synchronous way. | |
| 14 class AsyncFileUtilTestHelper { | |
| 15 public: | |
| 16 explicit AsyncFileUtilTestHelper(fileapi::AsyncFileUtil* async_file_util); | |
| 17 virtual ~AsyncFileUtilTestHelper(); | |
| 18 | |
| 19 // FileSystemFileUtil overrides. | |
|
vandebo (ex-Chrome)
2013/05/31 23:22:17
Out of date comment.
tommycli
2013/06/01 01:40:54
Done.
| |
| 20 virtual base::PlatformFileError CreateOrOpen( | |
| 21 fileapi::FileSystemOperationContext* context, | |
| 22 const fileapi::FileSystemURL& url, | |
| 23 int file_flags, | |
| 24 base::PlatformFile* file_handle, | |
| 25 bool* created); | |
| 26 virtual base::PlatformFileError EnsureFileExists( | |
| 27 fileapi::FileSystemOperationContext* context, | |
| 28 const fileapi::FileSystemURL& url, bool* created); | |
| 29 virtual base::PlatformFileError CreateDirectory( | |
| 30 fileapi::FileSystemOperationContext* context, | |
| 31 const fileapi::FileSystemURL& url, | |
| 32 bool exclusive, | |
| 33 bool recursive); | |
| 34 virtual base::PlatformFileError GetFileInfo( | |
| 35 fileapi::FileSystemOperationContext* context, | |
| 36 const fileapi::FileSystemURL& url, | |
| 37 base::PlatformFileInfo* file_info, | |
| 38 base::FilePath* platform_path); | |
| 39 virtual base::PlatformFileError Touch( | |
| 40 fileapi::FileSystemOperationContext* context, | |
| 41 const fileapi::FileSystemURL& url, | |
| 42 const base::Time& last_access_time, | |
| 43 const base::Time& last_modified_time); | |
| 44 virtual base::PlatformFileError Truncate( | |
| 45 fileapi::FileSystemOperationContext* context, | |
| 46 const fileapi::FileSystemURL& url, | |
| 47 int64 length); | |
| 48 virtual base::PlatformFileError CopyOrMoveFile( | |
| 49 fileapi::FileSystemOperationContext* context, | |
| 50 const fileapi::FileSystemURL& src_url, | |
| 51 const fileapi::FileSystemURL& dest_url, | |
| 52 bool copy); | |
| 53 virtual base::PlatformFileError CopyInForeignFile( | |
| 54 fileapi::FileSystemOperationContext* context, | |
| 55 const base::FilePath& src_file_path, | |
| 56 const fileapi::FileSystemURL& dest_url); | |
| 57 | |
| 58 virtual base::PlatformFileError ReadDirectorySync( | |
| 59 fileapi::FileSystemOperationContext* context, | |
| 60 const fileapi::FileSystemURL& url, | |
| 61 fileapi::AsyncFileUtil::EntryList* file_list, | |
| 62 bool* has_more); | |
| 63 | |
| 64 virtual scoped_refptr<webkit_blob::ShareableFileReference> | |
| 65 CreateSnapshotFileSharable( | |
| 66 fileapi::FileSystemOperationContext* context, | |
| 67 const fileapi::FileSystemURL& url, | |
| 68 base::PlatformFileError* error, | |
| 69 base::PlatformFileInfo* file_info, | |
| 70 base::FilePath* platform_path); | |
| 71 private: | |
| 72 scoped_ptr<fileapi::AsyncFileUtil> async_file_util_; | |
| 73 }; | |
| 74 | |
| 75 } // namespace fileapi | |
| 76 | |
| 77 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ASYNC_FILE_UTIL_TEST_HELPER_H_ | |
| OLD | NEW |