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

Side by Side Diff: storage/browser/fileapi/mount_points.h

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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
« no previous file with comments | « storage/browser/fileapi/local_file_util.cc ('k') | storage/browser/fileapi/mount_points.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) 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_BROWSER_FILEAPI_MOUNT_POINTS_H_ 5 #ifndef WEBKIT_BROWSER_FILEAPI_MOUNT_POINTS_H_
6 #define WEBKIT_BROWSER_FILEAPI_MOUNT_POINTS_H_ 6 #define WEBKIT_BROWSER_FILEAPI_MOUNT_POINTS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "webkit/browser/webkit_storage_browser_export.h" 13 #include "storage/common/storage_export.h"
14 #include "webkit/common/fileapi/file_system_util.h" 14 #include "storage/common/fileapi/file_system_util.h"
15 15
16 class GURL; 16 class GURL;
17 17
18 namespace fileapi { 18 namespace storage {
19 class FileSystemMountOption; 19 class FileSystemMountOption;
20 class FileSystemURL; 20 class FileSystemURL;
21 } 21 }
22 22
23 namespace fileapi { 23 namespace storage {
24 24
25 // Represents a set of mount points for File API. 25 // Represents a set of mount points for File API.
26 class WEBKIT_STORAGE_BROWSER_EXPORT MountPoints { 26 class STORAGE_EXPORT MountPoints {
27 public: 27 public:
28 struct WEBKIT_STORAGE_BROWSER_EXPORT MountPointInfo { 28 struct STORAGE_EXPORT MountPointInfo {
29 MountPointInfo(); 29 MountPointInfo();
30 MountPointInfo(const std::string& name, const base::FilePath& path); 30 MountPointInfo(const std::string& name, const base::FilePath& path);
31 31
32 // The name to be used to register the path. The registered file can 32 // The name to be used to register the path. The registered file can
33 // be referred by a virtual path /<filesystem_id>/<name>. 33 // be referred by a virtual path /<filesystem_id>/<name>.
34 // The name should NOT contain a path separator '/'. 34 // The name should NOT contain a path separator '/'.
35 std::string name; 35 std::string name;
36 36
37 // The path of the file. 37 // The path of the file.
38 base::FilePath path; 38 base::FilePath path;
(...skipping 19 matching lines...) Expand all
58 // Same as CreateCrackedFileSystemURL, but cracks FileSystemURL created 58 // Same as CreateCrackedFileSystemURL, but cracks FileSystemURL created
59 // from |url|. 59 // from |url|.
60 virtual FileSystemURL CrackURL(const GURL& url) const = 0; 60 virtual FileSystemURL CrackURL(const GURL& url) const = 0;
61 61
62 // Creates a FileSystemURL with the given origin, type and path and tries to 62 // Creates a FileSystemURL with the given origin, type and path and tries to
63 // crack it as a part of one of the registered mount points. 63 // crack it as a part of one of the registered mount points.
64 // If the the URL is not valid or does not belong to any of the mount points 64 // If the the URL is not valid or does not belong to any of the mount points
65 // registered in this context, returns empty, invalid FileSystemURL. 65 // registered in this context, returns empty, invalid FileSystemURL.
66 virtual FileSystemURL CreateCrackedFileSystemURL( 66 virtual FileSystemURL CreateCrackedFileSystemURL(
67 const GURL& origin, 67 const GURL& origin,
68 fileapi::FileSystemType type, 68 storage::FileSystemType type,
69 const base::FilePath& path) const = 0; 69 const base::FilePath& path) const = 0;
70 70
71 // Returns the mount point root path registered for a given |mount_name|. 71 // Returns the mount point root path registered for a given |mount_name|.
72 // Returns false if the given |mount_name| is not valid. 72 // Returns false if the given |mount_name| is not valid.
73 virtual bool GetRegisteredPath(const std::string& mount_name, 73 virtual bool GetRegisteredPath(const std::string& mount_name,
74 base::FilePath* path) const = 0; 74 base::FilePath* path) const = 0;
75 75
76 // Cracks the given |virtual_path| (which is the path part of a filesystem URL 76 // Cracks the given |virtual_path| (which is the path part of a filesystem URL
77 // without '/external' or '/isolated' prefix part) and populates the 77 // without '/external' or '/isolated' prefix part) and populates the
78 // |mount_name|, |type|, and |path| if the <mount_name> part embedded in 78 // |mount_name|, |type|, and |path| if the <mount_name> part embedded in
(...skipping 17 matching lines...) Expand all
96 96
97 // Same as CrackURL and CreateCrackedFileSystemURL, but cracks the url already 97 // Same as CrackURL and CreateCrackedFileSystemURL, but cracks the url already
98 // instantiated as the FileSystemURL class. This is internally used for nested 98 // instantiated as the FileSystemURL class. This is internally used for nested
99 // URL cracking in FileSystemContext. 99 // URL cracking in FileSystemContext.
100 virtual FileSystemURL CrackFileSystemURL(const FileSystemURL& url) const = 0; 100 virtual FileSystemURL CrackFileSystemURL(const FileSystemURL& url) const = 0;
101 101
102 private: 102 private:
103 DISALLOW_COPY_AND_ASSIGN(MountPoints); 103 DISALLOW_COPY_AND_ASSIGN(MountPoints);
104 }; 104 };
105 105
106 } // namespace fileapi 106 } // namespace storage
107 107
108 #endif // WEBKIT_BROWSER_FILEAPI_MOUNT_POINTS_H_ 108 #endif // WEBKIT_BROWSER_FILEAPI_MOUNT_POINTS_H_
OLDNEW
« no previous file with comments | « storage/browser/fileapi/local_file_util.cc ('k') | storage/browser/fileapi/mount_points.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698