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

Side by Side Diff: chrome/browser/media_galleries/fileapi/media_file_system_mount_point_provider.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
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_FILEAPI_MEDIA_MEDIA_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_MOUNT_POINT_PRO VIDER_H_
6 #define WEBKIT_FILEAPI_MEDIA_MEDIA_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_MOUNT_POINT_PRO VIDER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/media_galleries/fileapi/mtp_device_file_system_config.h "
9 #include "webkit/fileapi/file_system_mount_point_provider.h" 10 #include "webkit/fileapi/file_system_mount_point_provider.h"
10 #include "webkit/fileapi/media/mtp_device_file_system_config.h"
11 11
12 namespace fileapi { 12 namespace fileapi {
13 class AsyncFileUtilAdapter;
14 }
13 15
14 class AsyncFileUtilAdapter; 16 namespace chrome {
17
15 class MediaPathFilter; 18 class MediaPathFilter;
16 19
17 #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM) 20 #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM)
18 class DeviceMediaAsyncFileUtil; 21 class DeviceMediaAsyncFileUtil;
19 #endif 22 #endif
20 23
21 class MediaFileSystemMountPointProvider : public FileSystemMountPointProvider { 24 class MediaFileSystemMountPointProvider
25 : public fileapi::FileSystemMountPointProvider {
22 public: 26 public:
23 static const char kMediaPathFilterKey[]; 27 static const char kMediaPathFilterKey[];
24 static const char kMTPDeviceDelegateURLKey[]; 28 static const char kMTPDeviceDelegateURLKey[];
25 29
26 explicit MediaFileSystemMountPointProvider( 30 explicit MediaFileSystemMountPointProvider(
27 const base::FilePath& profile_path); 31 const base::FilePath& profile_path);
28 virtual ~MediaFileSystemMountPointProvider(); 32 virtual ~MediaFileSystemMountPointProvider();
29 33
30 // FileSystemMountPointProvider implementation. 34 // FileSystemMountPointProvider implementation.
31 virtual bool CanHandleType(FileSystemType type) const OVERRIDE; 35 virtual bool CanHandleType(fileapi::FileSystemType type) const OVERRIDE;
32 virtual void ValidateFileSystemRoot( 36 virtual void ValidateFileSystemRoot(
33 const GURL& origin_url, 37 const GURL& origin_url,
34 FileSystemType type, 38 fileapi::FileSystemType type,
35 bool create, 39 bool create,
36 const ValidateFileSystemCallback& callback) OVERRIDE; 40 const ValidateFileSystemCallback& callback) OVERRIDE;
37 virtual base::FilePath GetFileSystemRootPathOnFileThread( 41 virtual base::FilePath GetFileSystemRootPathOnFileThread(
38 const FileSystemURL& url, 42 const fileapi::FileSystemURL& url,
39 bool create) OVERRIDE; 43 bool create) OVERRIDE;
40 virtual FileSystemFileUtil* GetFileUtil(FileSystemType type) OVERRIDE; 44 virtual fileapi::FileSystemFileUtil* GetFileUtil(
41 virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) OVERRIDE; 45 fileapi::FileSystemType type) OVERRIDE;
42 virtual CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( 46 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil(
43 FileSystemType type, 47 fileapi::FileSystemType type) OVERRIDE;
48 virtual fileapi::CopyOrMoveFileValidatorFactory*
49 GetCopyOrMoveFileValidatorFactory(
50 fileapi::FileSystemType type,
44 base::PlatformFileError* error_code) OVERRIDE; 51 base::PlatformFileError* error_code) OVERRIDE;
45 virtual void InitializeCopyOrMoveFileValidatorFactory( 52 virtual void InitializeCopyOrMoveFileValidatorFactory(
46 FileSystemType type, 53 fileapi::FileSystemType type,
47 scoped_ptr<CopyOrMoveFileValidatorFactory> factory) OVERRIDE; 54 scoped_ptr<fileapi::CopyOrMoveFileValidatorFactory> factory) OVERRIDE;
48 virtual FilePermissionPolicy GetPermissionPolicy( 55 virtual fileapi::FilePermissionPolicy GetPermissionPolicy(
49 const FileSystemURL& url, 56 const fileapi::FileSystemURL& url, int permissions) const OVERRIDE;
50 int permissions) const OVERRIDE; 57 virtual fileapi::FileSystemOperation* CreateFileSystemOperation(
51 virtual FileSystemOperation* CreateFileSystemOperation( 58 const fileapi::FileSystemURL& url,
52 const FileSystemURL& url, 59 fileapi::FileSystemContext* context,
53 FileSystemContext* context,
54 base::PlatformFileError* error_code) const OVERRIDE; 60 base::PlatformFileError* error_code) const OVERRIDE;
55 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader( 61 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader(
56 const FileSystemURL& url, 62 const fileapi::FileSystemURL& url,
57 int64 offset, 63 int64 offset,
58 const base::Time& expected_modification_time, 64 const base::Time& expected_modification_time,
59 FileSystemContext* context) const OVERRIDE; 65 fileapi::FileSystemContext* context) const OVERRIDE;
60 virtual scoped_ptr<FileStreamWriter> CreateFileStreamWriter( 66 virtual scoped_ptr<fileapi::FileStreamWriter> CreateFileStreamWriter(
61 const FileSystemURL& url, 67 const fileapi::FileSystemURL& url,
62 int64 offset, 68 int64 offset,
63 FileSystemContext* context) const OVERRIDE; 69 fileapi::FileSystemContext* context) const OVERRIDE;
64 virtual FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; 70 virtual fileapi::FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE;
65 virtual void DeleteFileSystem( 71 virtual void DeleteFileSystem(
66 const GURL& origin_url, 72 const GURL& origin_url,
67 FileSystemType type, 73 fileapi::FileSystemType type,
68 FileSystemContext* context, 74 fileapi::FileSystemContext* context,
69 const DeleteFileSystemCallback& callback) OVERRIDE; 75 const DeleteFileSystemCallback& callback) OVERRIDE;
70 76
71 private: 77 private:
72 // Store the profile path. We need this to create temporary snapshot files. 78 // Store the profile path. We need this to create temporary snapshot files.
73 const base::FilePath profile_path_; 79 const base::FilePath profile_path_;
74 80
75 scoped_ptr<MediaPathFilter> media_path_filter_; 81 scoped_ptr<MediaPathFilter> media_path_filter_;
76 scoped_ptr<CopyOrMoveFileValidatorFactory> 82 scoped_ptr<fileapi::CopyOrMoveFileValidatorFactory>
77 media_copy_or_move_file_validator_factory_; 83 media_copy_or_move_file_validator_factory_;
78 84
79 scoped_ptr<AsyncFileUtilAdapter> native_media_file_util_; 85 scoped_ptr<fileapi::AsyncFileUtilAdapter> native_media_file_util_;
80 #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM) 86 #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM)
81 scoped_ptr<DeviceMediaAsyncFileUtil> device_media_async_file_util_; 87 scoped_ptr<DeviceMediaAsyncFileUtil> device_media_async_file_util_;
82 #endif 88 #endif
83 89
84 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemMountPointProvider); 90 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemMountPointProvider);
85 }; 91 };
86 92
87 } // namespace fileapi 93 } // namespace chrome
88 94
89 #endif // WEBKIT_FILEAPI_MEDIA_MEDIA_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_ 95 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_MOUNT_POINT_ PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698