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

Side by Side Diff: chrome/browser/chromeos/fileapi/file_system_backend.h

Issue 246293011: Mount MTP devices in Chrome OS Files.app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_H_
6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_H_ 6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "chrome/browser/media_galleries/fileapi/device_media_async_file_util.h"
14 #include "webkit/browser/fileapi/file_system_backend.h" 15 #include "webkit/browser/fileapi/file_system_backend.h"
15 #include "webkit/browser/quota/special_storage_policy.h" 16 #include "webkit/browser/quota/special_storage_policy.h"
16 #include "webkit/common/fileapi/file_system_types.h" 17 #include "webkit/common/fileapi/file_system_types.h"
17 18
18 namespace fileapi { 19 namespace fileapi {
19 class CopyOrMoveFileValidatorFactory; 20 class CopyOrMoveFileValidatorFactory;
20 class ExternalMountPoints; 21 class ExternalMountPoints;
21 class FileSystemURL; 22 class FileSystemURL;
22 } // namespace fileapi 23 } // namespace fileapi
23 24
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 class FileSystemBackend : public fileapi::ExternalFileSystemBackend { 62 class FileSystemBackend : public fileapi::ExternalFileSystemBackend {
62 public: 63 public:
63 using fileapi::FileSystemBackend::OpenFileSystemCallback; 64 using fileapi::FileSystemBackend::OpenFileSystemCallback;
64 65
65 // FileSystemBackend will take an ownership of a |mount_points| 66 // FileSystemBackend will take an ownership of a |mount_points|
66 // reference. On the other hand, |system_mount_points| will be kept as a raw 67 // reference. On the other hand, |system_mount_points| will be kept as a raw
67 // pointer and it should outlive FileSystemBackend instance. 68 // pointer and it should outlive FileSystemBackend instance.
68 // The ownerships of |drive_delegate| and |file_system_provider_delegate| are 69 // The ownerships of |drive_delegate| and |file_system_provider_delegate| are
69 // also taken. 70 // also taken.
70 FileSystemBackend( 71 FileSystemBackend(
72 const base::FilePath& profile_path,
71 FileSystemBackendDelegate* drive_delegate, 73 FileSystemBackendDelegate* drive_delegate,
72 FileSystemBackendDelegate* file_system_provider_delegate, 74 FileSystemBackendDelegate* file_system_provider_delegate,
73 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy, 75 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy,
74 scoped_refptr<fileapi::ExternalMountPoints> mount_points, 76 scoped_refptr<fileapi::ExternalMountPoints> mount_points,
75 fileapi::ExternalMountPoints* system_mount_points); 77 fileapi::ExternalMountPoints* system_mount_points);
76 virtual ~FileSystemBackend(); 78 virtual ~FileSystemBackend();
77 79
78 // Adds system mount points, such as "archive", and "removable". This 80 // Adds system mount points, such as "archive", and "removable". This
79 // function is no-op if these mount points are already present. 81 // function is no-op if these mount points are already present.
80 void AddSystemMountPoints(); 82 void AddSystemMountPoints();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 const base::FilePath& virtual_path) OVERRIDE; 126 const base::FilePath& virtual_path) OVERRIDE;
125 virtual void RevokeAccessForExtension( 127 virtual void RevokeAccessForExtension(
126 const std::string& extension_id) OVERRIDE; 128 const std::string& extension_id) OVERRIDE;
127 virtual bool GetVirtualPath(const base::FilePath& filesystem_path, 129 virtual bool GetVirtualPath(const base::FilePath& filesystem_path,
128 base::FilePath* virtual_path) OVERRIDE; 130 base::FilePath* virtual_path) OVERRIDE;
129 131
130 private: 132 private:
131 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; 133 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_;
132 scoped_ptr<FileAccessPermissions> file_access_permissions_; 134 scoped_ptr<FileAccessPermissions> file_access_permissions_;
133 scoped_ptr<fileapi::AsyncFileUtil> local_file_util_; 135 scoped_ptr<fileapi::AsyncFileUtil> local_file_util_;
136 scoped_ptr<DeviceMediaAsyncFileUtil> device_media_async_file_util_;
134 137
135 // The delegate instance for the drive file system related operations. 138 // The delegate instance for the drive file system related operations.
136 scoped_ptr<FileSystemBackendDelegate> drive_delegate_; 139 scoped_ptr<FileSystemBackendDelegate> drive_delegate_;
137 140
138 // The delegate instance for the provided file system related operations. 141 // The delegate instance for the provided file system related operations.
139 scoped_ptr<FileSystemBackendDelegate> file_system_provider_delegate_; 142 scoped_ptr<FileSystemBackendDelegate> file_system_provider_delegate_;
140 143
141 // Mount points specific to the owning context (i.e. per-profile mount 144 // Mount points specific to the owning context (i.e. per-profile mount
142 // points). 145 // points).
143 // 146 //
(...skipping 10 matching lines...) Expand all
154 // Globally visible mount points. System MountPonts instance should outlive 157 // Globally visible mount points. System MountPonts instance should outlive
155 // all FileSystemBackend instances, so raw pointer is safe. 158 // all FileSystemBackend instances, so raw pointer is safe.
156 fileapi::ExternalMountPoints* system_mount_points_; 159 fileapi::ExternalMountPoints* system_mount_points_;
157 160
158 DISALLOW_COPY_AND_ASSIGN(FileSystemBackend); 161 DISALLOW_COPY_AND_ASSIGN(FileSystemBackend);
159 }; 162 };
160 163
161 } // namespace chromeos 164 } // namespace chromeos
162 165
163 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_H_ 166 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698