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

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

Issue 8999017: Add CreateFileSystemOperation() method to FileSystemContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased from patch 9016020 Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 11 matching lines...) Expand all
22 class QuotaManagerProxy; 22 class QuotaManagerProxy;
23 } 23 }
24 24
25 namespace fileapi { 25 namespace fileapi {
26 26
27 class ExternalFileSystemMountPointProvider; 27 class ExternalFileSystemMountPointProvider;
28 class FileSystemCallbackDispatcher; 28 class FileSystemCallbackDispatcher;
29 class FileSystemContext; 29 class FileSystemContext;
30 class FileSystemFileUtil; 30 class FileSystemFileUtil;
31 class FileSystemMountPointProvider; 31 class FileSystemMountPointProvider;
32 class FileSystemOperationInterface;
32 class FileSystemOptions; 33 class FileSystemOptions;
33 class FileSystemPathManager; 34 class FileSystemPathManager;
34 class FileSystemQuotaUtil; 35 class FileSystemQuotaUtil;
35 class SandboxMountPointProvider; 36 class SandboxMountPointProvider;
36 37
37 struct DefaultContextDeleter; 38 struct DefaultContextDeleter;
38 39
39 // This class keeps and provides a file system context for FileSystem API. 40 // This class keeps and provides a file system context for FileSystem API.
40 // An instance of this class is created and owned by profile. 41 // An instance of this class is created and owned by profile.
41 class FileSystemContext 42 class FileSystemContext
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // If |create| is true this may actually setup a filesystem instance 93 // If |create| is true this may actually setup a filesystem instance
93 // (e.g. by creating the root directory or initializing the database 94 // (e.g. by creating the root directory or initializing the database
94 // entry etc). 95 // entry etc).
95 // TODO(kinuko): replace the dispatcher with regular callback. 96 // TODO(kinuko): replace the dispatcher with regular callback.
96 void OpenFileSystem( 97 void OpenFileSystem(
97 const GURL& origin_url, 98 const GURL& origin_url,
98 FileSystemType type, 99 FileSystemType type,
99 bool create, 100 bool create,
100 FileSystemCallbackDispatcher* dispatcher); 101 FileSystemCallbackDispatcher* dispatcher);
101 102
103 // Creates a new FileSystemOperation based on the given |url| that
104 // must be pointing to the target filesystem entry of the operation.
105 FileSystemOperationInterface* CreateFileSystemOperation(
106 const GURL& url,
107 FileSystemCallbackDispatcher* dispatcher,
108 base::MessageLoopProxy* file_proxy);
109
102 private: 110 private:
103 friend struct DefaultContextDeleter; 111 friend struct DefaultContextDeleter;
104 void DeleteOnCorrectThread() const; 112 void DeleteOnCorrectThread() const;
105 113
106 scoped_refptr<base::MessageLoopProxy> file_message_loop_; 114 scoped_refptr<base::MessageLoopProxy> file_message_loop_;
107 scoped_refptr<base::MessageLoopProxy> io_message_loop_; 115 scoped_refptr<base::MessageLoopProxy> io_message_loop_;
108 116
109 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_; 117 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_;
110 118
111 // Mount point providers. 119 // Mount point providers.
112 scoped_ptr<SandboxMountPointProvider> sandbox_provider_; 120 scoped_ptr<SandboxMountPointProvider> sandbox_provider_;
113 scoped_ptr<ExternalFileSystemMountPointProvider> external_provider_; 121 scoped_ptr<ExternalFileSystemMountPointProvider> external_provider_;
114 122
115 DISALLOW_IMPLICIT_CONSTRUCTORS(FileSystemContext); 123 DISALLOW_IMPLICIT_CONSTRUCTORS(FileSystemContext);
116 }; 124 };
117 125
118 struct DefaultContextDeleter { 126 struct DefaultContextDeleter {
119 static void Destruct(const FileSystemContext* context) { 127 static void Destruct(const FileSystemContext* context) {
120 context->DeleteOnCorrectThread(); 128 context->DeleteOnCorrectThread();
121 } 129 }
122 }; 130 };
123 131
124 } // namespace fileapi 132 } // namespace fileapi
125 133
126 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 134 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698