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

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

Issue 539143002: Migrate webkit/browser/ to storage/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android build Created 6 years, 3 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) 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_FILE_SYSTEM_BACKEND_H_ 5 #ifndef STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_
6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ 6 #define STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/files/file.h" 12 #include "base/files/file.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "webkit/browser/fileapi/file_permission_policy.h" 15 #include "storage/browser/fileapi/file_permission_policy.h"
16 #include "webkit/browser/fileapi/open_file_system_mode.h" 16 #include "storage/browser/fileapi/open_file_system_mode.h"
17 #include "webkit/browser/storage_browser_export.h" 17 #include "storage/browser/storage_browser_export.h"
18 #include "webkit/common/fileapi/file_system_types.h" 18 #include "storage/common/fileapi/file_system_types.h"
19 19
20 class GURL; 20 class GURL;
21 21
22 namespace storage { 22 namespace storage {
23 23
24 class AsyncFileUtil; 24 class AsyncFileUtil;
25 class CopyOrMoveFileValidatorFactory; 25 class CopyOrMoveFileValidatorFactory;
26 class FileSystemURL; 26 class FileSystemURL;
27 class FileStreamReader; 27 class FileStreamReader;
28 class FileStreamWriter; 28 class FileStreamWriter;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 const FileSystemURL& url, 125 const FileSystemURL& url,
126 int64 offset, 126 int64 offset,
127 FileSystemContext* context) const = 0; 127 FileSystemContext* context) const = 0;
128 128
129 // Returns the specialized FileSystemQuotaUtil for this backend. 129 // Returns the specialized FileSystemQuotaUtil for this backend.
130 // This could return NULL if this backend does not support quota. 130 // This could return NULL if this backend does not support quota.
131 virtual FileSystemQuotaUtil* GetQuotaUtil() = 0; 131 virtual FileSystemQuotaUtil* GetQuotaUtil() = 0;
132 }; 132 };
133 133
134 // An interface to control external file system access permissions. 134 // An interface to control external file system access permissions.
135 // TODO(satorux): Move this out of 'webkit/browser/fileapi'. crbug.com/257279 135 // TODO(satorux): Move this out of 'storage/browser/fileapi'. crbug.com/257279
136 class ExternalFileSystemBackend : public FileSystemBackend { 136 class ExternalFileSystemBackend : public FileSystemBackend {
137 public: 137 public:
138 // Returns true if |url| is allowed to be accessed. 138 // Returns true if |url| is allowed to be accessed.
139 // This is supposed to perform ExternalFileSystem-specific security 139 // This is supposed to perform ExternalFileSystem-specific security
140 // checks. 140 // checks.
141 virtual bool IsAccessAllowed(const storage::FileSystemURL& url) const = 0; 141 virtual bool IsAccessAllowed(const storage::FileSystemURL& url) const = 0;
142 // Returns the list of top level directories that are exposed by this 142 // Returns the list of top level directories that are exposed by this
143 // provider. This list is used to set appropriate child process file access 143 // provider. This list is used to set appropriate child process file access
144 // permissions. 144 // permissions.
145 virtual std::vector<base::FilePath> GetRootDirectories() const = 0; 145 virtual std::vector<base::FilePath> GetRootDirectories() const = 0;
(...skipping 13 matching lines...) Expand all
159 base::FilePath* virtual_path) = 0; 159 base::FilePath* virtual_path) = 0;
160 // Gets a redirect URL for contents. e.g. Google Drive URL for hosted 160 // Gets a redirect URL for contents. e.g. Google Drive URL for hosted
161 // documents. Returns empty URL if the entry does not have the redirect URL. 161 // documents. Returns empty URL if the entry does not have the redirect URL.
162 virtual void GetRedirectURLForContents( 162 virtual void GetRedirectURLForContents(
163 const storage::FileSystemURL& url, 163 const storage::FileSystemURL& url,
164 const storage::URLCallback& callback) = 0; 164 const storage::URLCallback& callback) = 0;
165 }; 165 };
166 166
167 } // namespace storage 167 } // namespace storage
168 168
169 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ 169 #endif // STORAGE_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_
OLDNEW
« no previous file with comments | « storage/browser/fileapi/file_stream_writer.h ('k') | storage/browser/fileapi/file_system_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698