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

Side by Side Diff: storage/browser/fileapi/local_file_util.h

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 months 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_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_ 5 #ifndef WEBKIT_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_
6 #define WEBKIT_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_ 6 #define WEBKIT_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "webkit/browser/fileapi/file_system_file_util.h" 11 #include "storage/browser/fileapi/file_system_file_util.h"
12 #include "webkit/browser/webkit_storage_browser_export.h" 12 #include "storage/common/storage_export.h"
13 13
14 namespace base { 14 namespace base {
15 class Time; 15 class Time;
16 } 16 }
17 17
18 class GURL; 18 class GURL;
19 19
20 namespace fileapi { 20 namespace storage {
21 21
22 class FileSystemOperationContext; 22 class FileSystemOperationContext;
23 class FileSystemURL; 23 class FileSystemURL;
24 24
25 // An instance of this class is created and owned by *FileSystemBackend. 25 // An instance of this class is created and owned by *FileSystemBackend.
26 class WEBKIT_STORAGE_BROWSER_EXPORT LocalFileUtil 26 class STORAGE_EXPORT LocalFileUtil : public FileSystemFileUtil {
27 : public FileSystemFileUtil {
28 public: 27 public:
29 LocalFileUtil(); 28 LocalFileUtil();
30 virtual ~LocalFileUtil(); 29 virtual ~LocalFileUtil();
31 30
32 virtual base::File CreateOrOpen( 31 virtual base::File CreateOrOpen(FileSystemOperationContext* context,
32 const FileSystemURL& url,
33 int file_flags) OVERRIDE;
34 virtual base::File::Error EnsureFileExists(
33 FileSystemOperationContext* context, 35 FileSystemOperationContext* context,
34 const FileSystemURL& url, 36 const FileSystemURL& url,
35 int file_flags) OVERRIDE; 37 bool* created) OVERRIDE;
36 virtual base::File::Error EnsureFileExists( 38 virtual base::File::Error CreateDirectory(FileSystemOperationContext* context,
37 FileSystemOperationContext* context, 39 const FileSystemURL& url,
38 const FileSystemURL& url, bool* created) OVERRIDE; 40 bool exclusive,
39 virtual base::File::Error CreateDirectory( 41 bool recursive) OVERRIDE;
40 FileSystemOperationContext* context, 42 virtual base::File::Error GetFileInfo(FileSystemOperationContext* context,
41 const FileSystemURL& url, 43 const FileSystemURL& url,
42 bool exclusive, 44 base::File::Info* file_info,
43 bool recursive) OVERRIDE; 45 base::FilePath* platform_file) OVERRIDE;
44 virtual base::File::Error GetFileInfo(
45 FileSystemOperationContext* context,
46 const FileSystemURL& url,
47 base::File::Info* file_info,
48 base::FilePath* platform_file) OVERRIDE;
49 virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( 46 virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator(
50 FileSystemOperationContext* context, 47 FileSystemOperationContext* context,
51 const FileSystemURL& root_url) OVERRIDE; 48 const FileSystemURL& root_url) OVERRIDE;
52 virtual base::File::Error GetLocalFilePath( 49 virtual base::File::Error GetLocalFilePath(
53 FileSystemOperationContext* context, 50 FileSystemOperationContext* context,
54 const FileSystemURL& file_system_url, 51 const FileSystemURL& file_system_url,
55 base::FilePath* local_file_path) OVERRIDE; 52 base::FilePath* local_file_path) OVERRIDE;
56 virtual base::File::Error Touch( 53 virtual base::File::Error Touch(
57 FileSystemOperationContext* context, 54 FileSystemOperationContext* context,
58 const FileSystemURL& url, 55 const FileSystemURL& url,
59 const base::Time& last_access_time, 56 const base::Time& last_access_time,
60 const base::Time& last_modified_time) OVERRIDE; 57 const base::Time& last_modified_time) OVERRIDE;
61 virtual base::File::Error Truncate( 58 virtual base::File::Error Truncate(FileSystemOperationContext* context,
62 FileSystemOperationContext* context, 59 const FileSystemURL& url,
63 const FileSystemURL& url, 60 int64 length) OVERRIDE;
64 int64 length) OVERRIDE; 61 virtual base::File::Error CopyOrMoveFile(FileSystemOperationContext* context,
65 virtual base::File::Error CopyOrMoveFile( 62 const FileSystemURL& src_url,
66 FileSystemOperationContext* context, 63 const FileSystemURL& dest_url,
67 const FileSystemURL& src_url, 64 CopyOrMoveOption option,
68 const FileSystemURL& dest_url, 65 bool copy) OVERRIDE;
69 CopyOrMoveOption option,
70 bool copy) OVERRIDE;
71 virtual base::File::Error CopyInForeignFile( 66 virtual base::File::Error CopyInForeignFile(
72 FileSystemOperationContext* context, 67 FileSystemOperationContext* context,
73 const base::FilePath& src_file_path, 68 const base::FilePath& src_file_path,
74 const FileSystemURL& dest_url) OVERRIDE; 69 const FileSystemURL& dest_url) OVERRIDE;
75 virtual base::File::Error DeleteFile( 70 virtual base::File::Error DeleteFile(FileSystemOperationContext* context,
76 FileSystemOperationContext* context, 71 const FileSystemURL& url) OVERRIDE;
77 const FileSystemURL& url) OVERRIDE; 72 virtual base::File::Error DeleteDirectory(FileSystemOperationContext* context,
78 virtual base::File::Error DeleteDirectory( 73 const FileSystemURL& url) OVERRIDE;
79 FileSystemOperationContext* context, 74 virtual storage::ScopedFile CreateSnapshotFile(
80 const FileSystemURL& url) OVERRIDE;
81 virtual webkit_blob::ScopedFile CreateSnapshotFile(
82 FileSystemOperationContext* context, 75 FileSystemOperationContext* context,
83 const FileSystemURL& url, 76 const FileSystemURL& url,
84 base::File::Error* error, 77 base::File::Error* error,
85 base::File::Info* file_info, 78 base::File::Info* file_info,
86 base::FilePath* platform_path) OVERRIDE; 79 base::FilePath* platform_path) OVERRIDE;
87 80
88 private: 81 private:
89 DISALLOW_COPY_AND_ASSIGN(LocalFileUtil); 82 DISALLOW_COPY_AND_ASSIGN(LocalFileUtil);
90 }; 83 };
91 84
92 } // namespace fileapi 85 } // namespace storage
93 86
94 #endif // WEBKIT_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_ 87 #endif // WEBKIT_BROWSER_FILEAPI_LOCAL_FILE_UTIL_H_
OLDNEW
« no previous file with comments | « storage/browser/fileapi/local_file_stream_writer.cc ('k') | storage/browser/fileapi/local_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698