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

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

Issue 23167002: FileAPI: Rename SandboxContext to SandboxFileSystemBackendDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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
« no previous file with comments | « content/content_tests.gypi ('k') | webkit/browser/fileapi/file_system_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_CONTEXT_H_ 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_
6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/scoped_vector.h" 15 #include "base/memory/scoped_vector.h"
16 #include "base/platform_file.h" 16 #include "base/platform_file.h"
17 #include "base/sequenced_task_runner_helpers.h" 17 #include "base/sequenced_task_runner_helpers.h"
18 #include "webkit/browser/fileapi/file_system_url.h" 18 #include "webkit/browser/fileapi/file_system_url.h"
19 #include "webkit/browser/fileapi/open_file_system_mode.h" 19 #include "webkit/browser/fileapi/open_file_system_mode.h"
20 #include "webkit/browser/fileapi/sandbox_context.h" 20 #include "webkit/browser/fileapi/sandbox_file_system_backend_delegate.h"
21 #include "webkit/browser/fileapi/task_runner_bound_observer_list.h" 21 #include "webkit/browser/fileapi/task_runner_bound_observer_list.h"
22 #include "webkit/browser/webkit_storage_browser_export.h" 22 #include "webkit/browser/webkit_storage_browser_export.h"
23 #include "webkit/common/fileapi/file_system_types.h" 23 #include "webkit/common/fileapi/file_system_types.h"
24 24
25 namespace base { 25 namespace base {
26 class FilePath; 26 class FilePath;
27 class SequencedTaskRunner; 27 class SequencedTaskRunner;
28 class SingleThreadTaskRunner; 28 class SingleThreadTaskRunner;
29 } 29 }
30 30
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // arguments. 221 // arguments.
222 FileSystemURL CreateCrackedFileSystemURL(const GURL& origin, 222 FileSystemURL CreateCrackedFileSystemURL(const GURL& origin,
223 FileSystemType type, 223 FileSystemType type,
224 const base::FilePath& path) const; 224 const base::FilePath& path) const;
225 225
226 #if defined(OS_CHROMEOS) && defined(GOOGLE_CHROME_BUILD) 226 #if defined(OS_CHROMEOS) && defined(GOOGLE_CHROME_BUILD)
227 // Used only on ChromeOS for now. 227 // Used only on ChromeOS for now.
228 void EnableTemporaryFileSystemInIncognito(); 228 void EnableTemporaryFileSystemInIncognito();
229 #endif 229 #endif
230 230
231 SandboxContext* sandbox_context() { return sandbox_context_.get(); } 231 SandboxFileSystemBackendDelegate* sandbox_delegate() {
232 return sandbox_delegate_.get();
233 }
232 234
233 private: 235 private:
234 typedef std::map<FileSystemType, FileSystemBackend*> 236 typedef std::map<FileSystemType, FileSystemBackend*>
235 FileSystemBackendMap; 237 FileSystemBackendMap;
236 238
237 // For CreateFileSystemOperation. 239 // For CreateFileSystemOperation.
238 friend class FileSystemOperationRunner; 240 friend class FileSystemOperationRunner;
239 241
240 // For sandbox_backend(). 242 // For sandbox_backend().
241 friend class SandboxFileSystemTestHelper; 243 friend class SandboxFileSystemTestHelper;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // Returns a FileSystemBackend, used only by test code. 278 // Returns a FileSystemBackend, used only by test code.
277 SandboxFileSystemBackend* sandbox_backend() const { 279 SandboxFileSystemBackend* sandbox_backend() const {
278 return sandbox_backend_.get(); 280 return sandbox_backend_.get();
279 } 281 }
280 282
281 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; 283 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
282 scoped_refptr<base::SequencedTaskRunner> default_file_task_runner_; 284 scoped_refptr<base::SequencedTaskRunner> default_file_task_runner_;
283 285
284 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_; 286 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_;
285 287
286 scoped_ptr<SandboxContext> sandbox_context_; 288 scoped_ptr<SandboxFileSystemBackendDelegate> sandbox_delegate_;
287 289
288 // Regular file system backends. 290 // Regular file system backends.
289 scoped_ptr<SandboxFileSystemBackend> sandbox_backend_; 291 scoped_ptr<SandboxFileSystemBackend> sandbox_backend_;
290 scoped_ptr<IsolatedFileSystemBackend> isolated_backend_; 292 scoped_ptr<IsolatedFileSystemBackend> isolated_backend_;
291 293
292 // Additional file system backends. 294 // Additional file system backends.
293 ScopedVector<FileSystemBackend> additional_backends_; 295 ScopedVector<FileSystemBackend> additional_backends_;
294 296
295 // Registered file system backends. 297 // Registered file system backends.
296 // The map must be constructed in the constructor since it can be accessed 298 // The map must be constructed in the constructor since it can be accessed
(...skipping 21 matching lines...) Expand all
318 320
319 struct DefaultContextDeleter { 321 struct DefaultContextDeleter {
320 static void Destruct(const FileSystemContext* context) { 322 static void Destruct(const FileSystemContext* context) {
321 context->DeleteOnCorrectThread(); 323 context->DeleteOnCorrectThread();
322 } 324 }
323 }; 325 };
324 326
325 } // namespace fileapi 327 } // namespace fileapi
326 328
327 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 329 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | webkit/browser/fileapi/file_system_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698