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

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

Issue 669603008: Standardize usage of virtual/override/final in storage/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 STORAGE_BROWSER_FILEAPI_ASYNC_FILE_UTIL_ADAPTER_H_ 5 #ifndef STORAGE_BROWSER_FILEAPI_ASYNC_FILE_UTIL_ADAPTER_H_
6 #define STORAGE_BROWSER_FILEAPI_ASYNC_FILE_UTIL_ADAPTER_H_ 6 #define STORAGE_BROWSER_FILEAPI_ASYNC_FILE_UTIL_ADAPTER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "storage/browser/fileapi/async_file_util.h" 9 #include "storage/browser/fileapi/async_file_util.h"
10 10
(...skipping 13 matching lines...) Expand all
24 // as far as FileSystemOperationContext given to each operation is kept alive. 24 // as far as FileSystemOperationContext given to each operation is kept alive.
25 class STORAGE_EXPORT AsyncFileUtilAdapter 25 class STORAGE_EXPORT AsyncFileUtilAdapter
26 : public NON_EXPORTED_BASE(AsyncFileUtil) { 26 : public NON_EXPORTED_BASE(AsyncFileUtil) {
27 public: 27 public:
28 // Creates a new AsyncFileUtil for |sync_file_util|. This takes the 28 // Creates a new AsyncFileUtil for |sync_file_util|. This takes the
29 // ownership of |sync_file_util|. (This doesn't take scoped_ptr<> just 29 // ownership of |sync_file_util|. (This doesn't take scoped_ptr<> just
30 // to save extra make_scoped_ptr; in all use cases a new fresh FileUtil is 30 // to save extra make_scoped_ptr; in all use cases a new fresh FileUtil is
31 // created only for this adapter.) 31 // created only for this adapter.)
32 explicit AsyncFileUtilAdapter(FileSystemFileUtil* sync_file_util); 32 explicit AsyncFileUtilAdapter(FileSystemFileUtil* sync_file_util);
33 33
34 virtual ~AsyncFileUtilAdapter(); 34 ~AsyncFileUtilAdapter() override;
35 35
36 FileSystemFileUtil* sync_file_util() { 36 FileSystemFileUtil* sync_file_util() {
37 return sync_file_util_.get(); 37 return sync_file_util_.get();
38 } 38 }
39 39
40 // AsyncFileUtil overrides. 40 // AsyncFileUtil overrides.
41 virtual void CreateOrOpen( 41 void CreateOrOpen(scoped_ptr<FileSystemOperationContext> context,
42 scoped_ptr<FileSystemOperationContext> context, 42 const FileSystemURL& url,
43 const FileSystemURL& url, 43 int file_flags,
44 int file_flags, 44 const CreateOrOpenCallback& callback) override;
45 const CreateOrOpenCallback& callback) override; 45 void EnsureFileExists(scoped_ptr<FileSystemOperationContext> context,
46 virtual void EnsureFileExists( 46 const FileSystemURL& url,
47 scoped_ptr<FileSystemOperationContext> context, 47 const EnsureFileExistsCallback& callback) override;
48 const FileSystemURL& url, 48 void CreateDirectory(scoped_ptr<FileSystemOperationContext> context,
49 const EnsureFileExistsCallback& callback) override; 49 const FileSystemURL& url,
50 virtual void CreateDirectory( 50 bool exclusive,
51 scoped_ptr<FileSystemOperationContext> context, 51 bool recursive,
52 const FileSystemURL& url, 52 const StatusCallback& callback) override;
53 bool exclusive, 53 void GetFileInfo(scoped_ptr<FileSystemOperationContext> context,
54 bool recursive, 54 const FileSystemURL& url,
55 const StatusCallback& callback) override; 55 const GetFileInfoCallback& callback) override;
56 virtual void GetFileInfo( 56 void ReadDirectory(scoped_ptr<FileSystemOperationContext> context,
57 scoped_ptr<FileSystemOperationContext> context, 57 const FileSystemURL& url,
58 const FileSystemURL& url, 58 const ReadDirectoryCallback& callback) override;
59 const GetFileInfoCallback& callback) override; 59 void Touch(scoped_ptr<FileSystemOperationContext> context,
60 virtual void ReadDirectory( 60 const FileSystemURL& url,
61 scoped_ptr<FileSystemOperationContext> context, 61 const base::Time& last_access_time,
62 const FileSystemURL& url, 62 const base::Time& last_modified_time,
63 const ReadDirectoryCallback& callback) override; 63 const StatusCallback& callback) override;
64 virtual void Touch( 64 void Truncate(scoped_ptr<FileSystemOperationContext> context,
65 scoped_ptr<FileSystemOperationContext> context, 65 const FileSystemURL& url,
66 const FileSystemURL& url, 66 int64 length,
67 const base::Time& last_access_time, 67 const StatusCallback& callback) override;
68 const base::Time& last_modified_time, 68 void CopyFileLocal(scoped_ptr<FileSystemOperationContext> context,
69 const StatusCallback& callback) override; 69 const FileSystemURL& src_url,
70 virtual void Truncate( 70 const FileSystemURL& dest_url,
71 scoped_ptr<FileSystemOperationContext> context, 71 CopyOrMoveOption option,
72 const FileSystemURL& url, 72 const CopyFileProgressCallback& progress_callback,
73 int64 length, 73 const StatusCallback& callback) override;
74 const StatusCallback& callback) override; 74 void MoveFileLocal(scoped_ptr<FileSystemOperationContext> context,
75 virtual void CopyFileLocal( 75 const FileSystemURL& src_url,
76 scoped_ptr<FileSystemOperationContext> context, 76 const FileSystemURL& dest_url,
77 const FileSystemURL& src_url, 77 CopyOrMoveOption option,
78 const FileSystemURL& dest_url, 78 const StatusCallback& callback) override;
79 CopyOrMoveOption option, 79 void CopyInForeignFile(scoped_ptr<FileSystemOperationContext> context,
80 const CopyFileProgressCallback& progress_callback, 80 const base::FilePath& src_file_path,
81 const StatusCallback& callback) override; 81 const FileSystemURL& dest_url,
82 virtual void MoveFileLocal( 82 const StatusCallback& callback) override;
83 scoped_ptr<FileSystemOperationContext> context, 83 void DeleteFile(scoped_ptr<FileSystemOperationContext> context,
84 const FileSystemURL& src_url, 84 const FileSystemURL& url,
85 const FileSystemURL& dest_url, 85 const StatusCallback& callback) override;
86 CopyOrMoveOption option, 86 void DeleteDirectory(scoped_ptr<FileSystemOperationContext> context,
87 const StatusCallback& callback) override; 87 const FileSystemURL& url,
88 virtual void CopyInForeignFile( 88 const StatusCallback& callback) override;
89 scoped_ptr<FileSystemOperationContext> context, 89 void DeleteRecursively(scoped_ptr<FileSystemOperationContext> context,
90 const base::FilePath& src_file_path, 90 const FileSystemURL& url,
91 const FileSystemURL& dest_url, 91 const StatusCallback& callback) override;
92 const StatusCallback& callback) override; 92 void CreateSnapshotFile(scoped_ptr<FileSystemOperationContext> context,
93 virtual void DeleteFile( 93 const FileSystemURL& url,
94 scoped_ptr<FileSystemOperationContext> context, 94 const CreateSnapshotFileCallback& callback) override;
95 const FileSystemURL& url,
96 const StatusCallback& callback) override;
97 virtual void DeleteDirectory(
98 scoped_ptr<FileSystemOperationContext> context,
99 const FileSystemURL& url,
100 const StatusCallback& callback) override;
101 virtual void DeleteRecursively(
102 scoped_ptr<FileSystemOperationContext> context,
103 const FileSystemURL& url,
104 const StatusCallback& callback) override;
105 virtual void CreateSnapshotFile(
106 scoped_ptr<FileSystemOperationContext> context,
107 const FileSystemURL& url,
108 const CreateSnapshotFileCallback& callback) override;
109 95
110 private: 96 private:
111 scoped_ptr<FileSystemFileUtil> sync_file_util_; 97 scoped_ptr<FileSystemFileUtil> sync_file_util_;
112 98
113 DISALLOW_COPY_AND_ASSIGN(AsyncFileUtilAdapter); 99 DISALLOW_COPY_AND_ASSIGN(AsyncFileUtilAdapter);
114 }; 100 };
115 101
116 } // namespace storage 102 } // namespace storage
117 103
118 #endif // STORAGE_BROWSER_FILEAPI_ASYNC_FILE_UTIL_ADAPTER_H_ 104 #endif // STORAGE_BROWSER_FILEAPI_ASYNC_FILE_UTIL_ADAPTER_H_
OLDNEW
« no previous file with comments | « storage/browser/database/database_quota_client.h ('k') | storage/browser/fileapi/copy_or_move_operation_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698