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

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

Issue 14247034: Move Media Galleries FileAPI code out of webkit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cr-14352004
Patch Set: Add android ifdef. Created 7 years, 8 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
« no previous file with comments | « content/public/browser/content_browser_client.h ('k') | webkit/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_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 <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/fileapi/file_system_types.h" 18 #include "webkit/fileapi/file_system_types.h"
19 #include "webkit/fileapi/file_system_url.h" 19 #include "webkit/fileapi/file_system_url.h"
20 #include "webkit/fileapi/task_runner_bound_observer_list.h" 20 #include "webkit/fileapi/task_runner_bound_observer_list.h"
21 #include "webkit/storage/webkit_storage_export.h" 21 #include "webkit/storage/webkit_storage_export.h"
22 22
23 namespace base { 23 namespace base {
24 class FilePath; 24 class FilePath;
25 } 25 }
26 26
27 namespace chrome {
28 class NativeMediaFileUtilTest;
29 }
30
27 namespace quota { 31 namespace quota {
28 class QuotaManagerProxy; 32 class QuotaManagerProxy;
29 class SpecialStoragePolicy; 33 class SpecialStoragePolicy;
30 } 34 }
31 35
32 namespace sync_file_system { 36 namespace sync_file_system {
33 class LocalFileChangeTracker; 37 class LocalFileChangeTracker;
34 class LocalFileSyncContext; 38 class LocalFileSyncContext;
35 } 39 }
36 40
(...skipping 11 matching lines...) Expand all
48 class FileStreamWriter; 52 class FileStreamWriter;
49 class FileSystemFileUtil; 53 class FileSystemFileUtil;
50 class FileSystemMountPointProvider; 54 class FileSystemMountPointProvider;
51 class FileSystemOperation; 55 class FileSystemOperation;
52 class FileSystemOptions; 56 class FileSystemOptions;
53 class FileSystemQuotaUtil; 57 class FileSystemQuotaUtil;
54 class FileSystemTaskRunners; 58 class FileSystemTaskRunners;
55 class FileSystemURL; 59 class FileSystemURL;
56 class IsolatedMountPointProvider; 60 class IsolatedMountPointProvider;
57 class MountPoints; 61 class MountPoints;
58 class MediaFileSystemMountPointProvider;
59 class SandboxMountPointProvider; 62 class SandboxMountPointProvider;
60 63
61 struct DefaultContextDeleter; 64 struct DefaultContextDeleter;
62 65
63 // This class keeps and provides a file system context for FileSystem API. 66 // This class keeps and provides a file system context for FileSystem API.
64 // An instance of this class is created and owned by profile. 67 // An instance of this class is created and owned by profile.
65 class WEBKIT_STORAGE_EXPORT FileSystemContext 68 class WEBKIT_STORAGE_EXPORT FileSystemContext
66 : public base::RefCountedThreadSafe<FileSystemContext, 69 : public base::RefCountedThreadSafe<FileSystemContext,
67 DefaultContextDeleter> { 70 DefaultContextDeleter> {
68 public: 71 public:
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // supports synchronous FileUtil. 235 // supports synchronous FileUtil.
233 friend class LocalFileSystemOperation; 236 friend class LocalFileSystemOperation;
234 friend class sync_file_system::LocalFileChangeTracker; 237 friend class sync_file_system::LocalFileChangeTracker;
235 friend class sync_file_system::LocalFileSyncContext; 238 friend class sync_file_system::LocalFileSyncContext;
236 239
237 // Friended for GetFileUtil. 240 // Friended for GetFileUtil.
238 // Test classes that rely on synchronous FileUtils. 241 // Test classes that rely on synchronous FileUtils.
239 friend class webkit_blob::BlobURLRequestJobTest; 242 friend class webkit_blob::BlobURLRequestJobTest;
240 friend class FileSystemQuotaClientTest; 243 friend class FileSystemQuotaClientTest;
241 friend class LocalFileSystemTestOriginHelper; 244 friend class LocalFileSystemTestOriginHelper;
242 friend class NativeMediaFileUtilTest; 245 friend class chrome::NativeMediaFileUtilTest;
243 friend class FileSystemURLRequestJobTest; 246 friend class FileSystemURLRequestJobTest;
244 friend class UploadFileSystemFileElementReaderTest; 247 friend class UploadFileSystemFileElementReaderTest;
245 248
246 // Deleters. 249 // Deleters.
247 friend struct DefaultContextDeleter; 250 friend struct DefaultContextDeleter;
248 friend class base::DeleteHelper<FileSystemContext>; 251 friend class base::DeleteHelper<FileSystemContext>;
249 friend class base::RefCountedThreadSafe<FileSystemContext, 252 friend class base::RefCountedThreadSafe<FileSystemContext,
250 DefaultContextDeleter>; 253 DefaultContextDeleter>;
251 ~FileSystemContext(); 254 ~FileSystemContext();
252 255
(...skipping 19 matching lines...) Expand all
272 275
273 scoped_ptr<FileSystemTaskRunners> task_runners_; 276 scoped_ptr<FileSystemTaskRunners> task_runners_;
274 277
275 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_; 278 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_;
276 279
277 // Regular mount point providers. 280 // Regular mount point providers.
278 scoped_ptr<SandboxMountPointProvider> sandbox_provider_; 281 scoped_ptr<SandboxMountPointProvider> sandbox_provider_;
279 scoped_ptr<IsolatedMountPointProvider> isolated_provider_; 282 scoped_ptr<IsolatedMountPointProvider> isolated_provider_;
280 scoped_ptr<ExternalFileSystemMountPointProvider> external_provider_; 283 scoped_ptr<ExternalFileSystemMountPointProvider> external_provider_;
281 284
282 // TODO(kinuko,vandebo): Move this out of webkit/fileapi layer and
283 // give this provider as additional_providers.
284 scoped_ptr<MediaFileSystemMountPointProvider> media_provider_;
285
286 // Additional mount point providers. 285 // Additional mount point providers.
287 ScopedVector<FileSystemMountPointProvider> additional_providers_; 286 ScopedVector<FileSystemMountPointProvider> additional_providers_;
288 287
289 // Registered mount point providers. 288 // Registered mount point providers.
290 // The map must be constructed in the constructor since it can be accessed 289 // The map must be constructed in the constructor since it can be accessed
291 // on multiple threads. 290 // on multiple threads.
292 // The ownership of each provider is held by mount_point_providers_. 291 // The ownership of each provider is held by mount_point_providers_.
293 MountPointProviderMap provider_map_; 292 MountPointProviderMap provider_map_;
294 // External mount points visible in the file system context (excluding system 293 // External mount points visible in the file system context (excluding system
295 // external mount points). 294 // external mount points).
(...skipping 15 matching lines...) Expand all
311 310
312 struct DefaultContextDeleter { 311 struct DefaultContextDeleter {
313 static void Destruct(const FileSystemContext* context) { 312 static void Destruct(const FileSystemContext* context) {
314 context->DeleteOnCorrectThread(); 313 context->DeleteOnCorrectThread();
315 } 314 }
316 }; 315 };
317 316
318 } // namespace fileapi 317 } // namespace fileapi
319 318
320 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 319 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/public/browser/content_browser_client.h ('k') | webkit/fileapi/file_system_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698