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

Side by Side Diff: webkit/browser/chromeos/fileapi/cros_mount_point_provider.h

Issue 15959006: Deprecate FileSystemMountPointProvider::GetFileSystemRootPathOnFileThread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 (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_CHROMEOS_FILEAPI_CROS_MOUNT_POINT_PROVIDER_H_ 5 #ifndef WEBKIT_BROWSER_CHROMEOS_FILEAPI_CROS_MOUNT_POINT_PROVIDER_H_
6 #define WEBKIT_BROWSER_CHROMEOS_FILEAPI_CROS_MOUNT_POINT_PROVIDER_H_ 6 #define WEBKIT_BROWSER_CHROMEOS_FILEAPI_CROS_MOUNT_POINT_PROVIDER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // This could be called on any threads. 52 // This could be called on any threads.
53 static bool CanHandleURL(const fileapi::FileSystemURL& url); 53 static bool CanHandleURL(const fileapi::FileSystemURL& url);
54 54
55 // fileapi::FileSystemMountPointProvider overrides. 55 // fileapi::FileSystemMountPointProvider overrides.
56 virtual bool CanHandleType(fileapi::FileSystemType type) const OVERRIDE; 56 virtual bool CanHandleType(fileapi::FileSystemType type) const OVERRIDE;
57 virtual void ValidateFileSystemRoot( 57 virtual void ValidateFileSystemRoot(
58 const GURL& origin_url, 58 const GURL& origin_url,
59 fileapi::FileSystemType type, 59 fileapi::FileSystemType type,
60 bool create, 60 bool create,
61 const ValidateFileSystemCallback& callback) OVERRIDE; 61 const ValidateFileSystemCallback& callback) OVERRIDE;
62 virtual base::FilePath GetFileSystemRootPathOnFileThread(
63 const fileapi::FileSystemURL& url,
64 bool create) OVERRIDE;
65 virtual fileapi::FileSystemFileUtil* GetFileUtil( 62 virtual fileapi::FileSystemFileUtil* GetFileUtil(
66 fileapi::FileSystemType type) OVERRIDE; 63 fileapi::FileSystemType type) OVERRIDE;
67 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil( 64 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil(
68 fileapi::FileSystemType type) OVERRIDE; 65 fileapi::FileSystemType type) OVERRIDE;
69 virtual fileapi::CopyOrMoveFileValidatorFactory* 66 virtual fileapi::CopyOrMoveFileValidatorFactory*
70 GetCopyOrMoveFileValidatorFactory( 67 GetCopyOrMoveFileValidatorFactory(
71 fileapi::FileSystemType type, 68 fileapi::FileSystemType type,
72 base::PlatformFileError* error_code) OVERRIDE; 69 base::PlatformFileError* error_code) OVERRIDE;
73 virtual void InitializeCopyOrMoveFileValidatorFactory( 70 virtual void InitializeCopyOrMoveFileValidatorFactory(
74 fileapi::FileSystemType type, 71 fileapi::FileSystemType type,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 const std::string& extension_id, 103 const std::string& extension_id,
107 const base::FilePath& virtual_path) OVERRIDE; 104 const base::FilePath& virtual_path) OVERRIDE;
108 virtual void RevokeAccessForExtension( 105 virtual void RevokeAccessForExtension(
109 const std::string& extension_id) OVERRIDE; 106 const std::string& extension_id) OVERRIDE;
110 virtual bool GetVirtualPath(const base::FilePath& filesystem_path, 107 virtual bool GetVirtualPath(const base::FilePath& filesystem_path,
111 base::FilePath* virtual_path) OVERRIDE; 108 base::FilePath* virtual_path) OVERRIDE;
112 109
113 private: 110 private:
114 fileapi::RemoteFileSystemProxyInterface* GetRemoteProxy( 111 fileapi::RemoteFileSystemProxyInterface* GetRemoteProxy(
115 const std::string& mount_name) const; 112 const std::string& mount_name) const;
113 base::FilePath GetFileSystemRootPath(const fileapi::FileSystemURL& url) const;
116 114
117 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; 115 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_;
118 scoped_ptr<FileAccessPermissions> file_access_permissions_; 116 scoped_ptr<FileAccessPermissions> file_access_permissions_;
119 scoped_ptr<fileapi::AsyncFileUtilAdapter> local_file_util_; 117 scoped_ptr<fileapi::AsyncFileUtilAdapter> local_file_util_;
120 118
121 // Mount points specific to the owning context. 119 // Mount points specific to the owning context.
122 // 120 //
123 // Add/Remove MountPoints will affect only these mount points. 121 // Add/Remove MountPoints will affect only these mount points.
124 // 122 //
125 // It is legal to have mount points with the same name as in 123 // It is legal to have mount points with the same name as in
126 // system_mount_points_. Also, mount point paths may overlap with mount point 124 // system_mount_points_. Also, mount point paths may overlap with mount point
127 // paths in system_mount_points_. In both cases mount points in 125 // paths in system_mount_points_. In both cases mount points in
128 // |mount_points_| will have a priority. 126 // |mount_points_| will have a priority.
129 // E.g. if |mount_points_| map 'foo1' to '/foo/foo1' and 127 // E.g. if |mount_points_| map 'foo1' to '/foo/foo1' and
130 // |file_system_mount_points_| map 'xxx' to '/foo/foo1/xxx', |GetVirtualPaths| 128 // |file_system_mount_points_| map 'xxx' to '/foo/foo1/xxx', |GetVirtualPaths|
131 // will resolve '/foo/foo1/xxx/yyy' as 'foo1/xxx/yyy' (i.e. the mapping from 129 // will resolve '/foo/foo1/xxx/yyy' as 'foo1/xxx/yyy' (i.e. the mapping from
132 // |mount_points_| will be used). 130 // |mount_points_| will be used).
133 scoped_refptr<fileapi::ExternalMountPoints> mount_points_; 131 scoped_refptr<fileapi::ExternalMountPoints> mount_points_;
134 132
135 // Globally visible mount points. System MountPonts instance should outlive 133 // Globally visible mount points. System MountPonts instance should outlive
136 // all CrosMountPointProvider instances, so raw pointer is safe. 134 // all CrosMountPointProvider instances, so raw pointer is safe.
137 fileapi::ExternalMountPoints* system_mount_points_; 135 fileapi::ExternalMountPoints* system_mount_points_;
138 136
139 DISALLOW_COPY_AND_ASSIGN(CrosMountPointProvider); 137 DISALLOW_COPY_AND_ASSIGN(CrosMountPointProvider);
140 }; 138 };
141 139
142 } // namespace chromeos 140 } // namespace chromeos
143 141
144 #endif // WEBKIT_BROWSER_CHROMEOS_FILEAPI_CROS_MOUNT_POINT_PROVIDER_H_ 142 #endif // WEBKIT_BROWSER_CHROMEOS_FILEAPI_CROS_MOUNT_POINT_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698