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

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

Issue 18580012: Cleanup: return value and null-callback fixups on AsyncFileUtil interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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) 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 WEBKIT_BROWSER_FILEAPI_ASYNC_FILE_UTIL_ADAPTER_H_ 5 #ifndef WEBKIT_BROWSER_FILEAPI_ASYNC_FILE_UTIL_ADAPTER_H_
6 #define WEBKIT_BROWSER_FILEAPI_ASYNC_FILE_UTIL_ADAPTER_H_ 6 #define WEBKIT_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 "webkit/browser/fileapi/async_file_util.h" 9 #include "webkit/browser/fileapi/async_file_util.h"
10 10
(...skipping 20 matching lines...) Expand all
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 virtual ~AsyncFileUtilAdapter();
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 bool CreateOrOpen( 41 virtual void CreateOrOpen(
42 scoped_ptr<FileSystemOperationContext> context, 42 scoped_ptr<FileSystemOperationContext> context,
43 const FileSystemURL& url, 43 const FileSystemURL& url,
44 int file_flags, 44 int file_flags,
45 const CreateOrOpenCallback& callback) OVERRIDE; 45 const CreateOrOpenCallback& callback) OVERRIDE;
46 virtual bool EnsureFileExists( 46 virtual void EnsureFileExists(
47 scoped_ptr<FileSystemOperationContext> context, 47 scoped_ptr<FileSystemOperationContext> context,
48 const FileSystemURL& url, 48 const FileSystemURL& url,
49 const EnsureFileExistsCallback& callback) OVERRIDE; 49 const EnsureFileExistsCallback& callback) OVERRIDE;
50 virtual bool CreateDirectory( 50 virtual void CreateDirectory(
51 scoped_ptr<FileSystemOperationContext> context, 51 scoped_ptr<FileSystemOperationContext> context,
52 const FileSystemURL& url, 52 const FileSystemURL& url,
53 bool exclusive, 53 bool exclusive,
54 bool recursive, 54 bool recursive,
55 const StatusCallback& callback) OVERRIDE; 55 const StatusCallback& callback) OVERRIDE;
56 virtual bool GetFileInfo( 56 virtual void GetFileInfo(
57 scoped_ptr<FileSystemOperationContext> context, 57 scoped_ptr<FileSystemOperationContext> context,
58 const FileSystemURL& url, 58 const FileSystemURL& url,
59 const GetFileInfoCallback& callback) OVERRIDE; 59 const GetFileInfoCallback& callback) OVERRIDE;
60 virtual bool ReadDirectory( 60 virtual void ReadDirectory(
61 scoped_ptr<FileSystemOperationContext> context, 61 scoped_ptr<FileSystemOperationContext> context,
62 const FileSystemURL& url, 62 const FileSystemURL& url,
63 const ReadDirectoryCallback& callback) OVERRIDE; 63 const ReadDirectoryCallback& callback) OVERRIDE;
64 virtual bool Touch( 64 virtual void Touch(
65 scoped_ptr<FileSystemOperationContext> context, 65 scoped_ptr<FileSystemOperationContext> context,
66 const FileSystemURL& url, 66 const FileSystemURL& url,
67 const base::Time& last_access_time, 67 const base::Time& last_access_time,
68 const base::Time& last_modified_time, 68 const base::Time& last_modified_time,
69 const StatusCallback& callback) OVERRIDE; 69 const StatusCallback& callback) OVERRIDE;
70 virtual bool Truncate( 70 virtual void Truncate(
71 scoped_ptr<FileSystemOperationContext> context, 71 scoped_ptr<FileSystemOperationContext> context,
72 const FileSystemURL& url, 72 const FileSystemURL& url,
73 int64 length, 73 int64 length,
74 const StatusCallback& callback) OVERRIDE; 74 const StatusCallback& callback) OVERRIDE;
75 virtual bool CopyFileLocal( 75 virtual void CopyFileLocal(
76 scoped_ptr<FileSystemOperationContext> context, 76 scoped_ptr<FileSystemOperationContext> context,
77 const FileSystemURL& src_url, 77 const FileSystemURL& src_url,
78 const FileSystemURL& dest_url, 78 const FileSystemURL& dest_url,
79 const StatusCallback& callback) OVERRIDE; 79 const StatusCallback& callback) OVERRIDE;
80 virtual bool MoveFileLocal( 80 virtual void MoveFileLocal(
81 scoped_ptr<FileSystemOperationContext> context, 81 scoped_ptr<FileSystemOperationContext> context,
82 const FileSystemURL& src_url, 82 const FileSystemURL& src_url,
83 const FileSystemURL& dest_url, 83 const FileSystemURL& dest_url,
84 const StatusCallback& callback) OVERRIDE; 84 const StatusCallback& callback) OVERRIDE;
85 virtual bool CopyInForeignFile( 85 virtual void CopyInForeignFile(
86 scoped_ptr<FileSystemOperationContext> context, 86 scoped_ptr<FileSystemOperationContext> context,
87 const base::FilePath& src_file_path, 87 const base::FilePath& src_file_path,
88 const FileSystemURL& dest_url, 88 const FileSystemURL& dest_url,
89 const StatusCallback& callback) OVERRIDE; 89 const StatusCallback& callback) OVERRIDE;
90 virtual bool DeleteFile( 90 virtual void DeleteFile(
91 scoped_ptr<FileSystemOperationContext> context, 91 scoped_ptr<FileSystemOperationContext> context,
92 const FileSystemURL& url, 92 const FileSystemURL& url,
93 const StatusCallback& callback) OVERRIDE; 93 const StatusCallback& callback) OVERRIDE;
94 virtual bool DeleteDirectory( 94 virtual void DeleteDirectory(
95 scoped_ptr<FileSystemOperationContext> context, 95 scoped_ptr<FileSystemOperationContext> context,
96 const FileSystemURL& url, 96 const FileSystemURL& url,
97 const StatusCallback& callback) OVERRIDE; 97 const StatusCallback& callback) OVERRIDE;
98 virtual bool DeleteRecursively( 98 virtual void DeleteRecursively(
99 scoped_ptr<FileSystemOperationContext> context, 99 scoped_ptr<FileSystemOperationContext> context,
100 const FileSystemURL& url, 100 const FileSystemURL& url,
101 const StatusCallback& callback) OVERRIDE; 101 const StatusCallback& callback) OVERRIDE;
102 virtual bool CreateSnapshotFile( 102 virtual void CreateSnapshotFile(
103 scoped_ptr<FileSystemOperationContext> context, 103 scoped_ptr<FileSystemOperationContext> context,
104 const FileSystemURL& url, 104 const FileSystemURL& url,
105 const CreateSnapshotFileCallback& callback) OVERRIDE; 105 const CreateSnapshotFileCallback& callback) OVERRIDE;
106 106
107 private: 107 private:
108 scoped_ptr<FileSystemFileUtil> sync_file_util_; 108 scoped_ptr<FileSystemFileUtil> sync_file_util_;
109 109
110 DISALLOW_COPY_AND_ASSIGN(AsyncFileUtilAdapter); 110 DISALLOW_COPY_AND_ASSIGN(AsyncFileUtilAdapter);
111 }; 111 };
112 112
113 } // namespace fileapi 113 } // namespace fileapi
114 114
115 #endif // WEBKIT_BROWSER_FILEAPI_ASYNC_FILE_UTIL_ADAPTER_H_ 115 #endif // WEBKIT_BROWSER_FILEAPI_ASYNC_FILE_UTIL_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698