| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SANDBOX_MOUNT_POINT_PROVIDER_H_ | 5 #ifndef WEBKIT_FILEAPI_SANDBOX_MOUNT_POINT_PROVIDER_H_ |
| 6 #define WEBKIT_FILEAPI_SANDBOX_MOUNT_POINT_PROVIDER_H_ | 6 #define WEBKIT_FILEAPI_SANDBOX_MOUNT_POINT_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> |
| 9 | 10 |
| 10 #include "base/file_path.h" | 11 #include "base/file_path.h" |
| 11 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
| 12 #include "webkit/fileapi/file_system_mount_point_provider.h" | 13 #include "webkit/fileapi/file_system_mount_point_provider.h" |
| 13 | 14 |
| 14 class GURL; | 15 class GURL; |
| 15 | 16 |
| 16 namespace base { | 17 namespace base { |
| 17 class MessageLoopProxy; | 18 class MessageLoopProxy; |
| 18 } | 19 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 static const char kPersistentName[]; | 55 static const char kPersistentName[]; |
| 55 static const char kTemporaryName[]; | 56 static const char kTemporaryName[]; |
| 56 | 57 |
| 57 const FilePath& base_path() const { | 58 const FilePath& base_path() const { |
| 58 return base_path_; | 59 return base_path_; |
| 59 } | 60 } |
| 60 | 61 |
| 61 // Checks if a given |name| contains any restricted names/chars in it. | 62 // Checks if a given |name| contains any restricted names/chars in it. |
| 62 virtual bool IsRestrictedFileName(const FilePath& filename) const; | 63 virtual bool IsRestrictedFileName(const FilePath& filename) const; |
| 63 | 64 |
| 65 virtual std::vector<FilePath> GetRootDirectories() const { |
| 66 return std::vector<FilePath>(); |
| 67 } |
| 68 |
| 64 // Returns the origin identifier string, which is used as a part of the | 69 // Returns the origin identifier string, which is used as a part of the |
| 65 // sandboxed path component, for the given |url|. | 70 // sandboxed path component, for the given |url|. |
| 66 static std::string GetOriginIdentifierFromURL(const GURL& url); | 71 static std::string GetOriginIdentifierFromURL(const GURL& url); |
| 67 | 72 |
| 68 // Gets a base directory path of the sandboxed filesystem that is | 73 // Gets a base directory path of the sandboxed filesystem that is |
| 69 // specified by |origin_identifier| and |type|. | 74 // specified by |origin_identifier| and |type|. |
| 70 // |base_path| must be pointing the FileSystem's data directory | 75 // |base_path| must be pointing the FileSystem's data directory |
| 71 // under the profile directory, i.e. <profile_dir>/kFileSystemDirectory. | 76 // under the profile directory, i.e. <profile_dir>/kFileSystemDirectory. |
| 72 // Returns an empty path if any of the given parameters are invalid. | 77 // Returns an empty path if any of the given parameters are invalid. |
| 73 // Returned directory path does not contain 'unique' part, therefore | 78 // Returned directory path does not contain 'unique' part, therefore |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 118 |
| 114 const FilePath base_path_; | 119 const FilePath base_path_; |
| 115 | 120 |
| 116 DISALLOW_COPY_AND_ASSIGN(SandboxMountPointProvider); | 121 DISALLOW_COPY_AND_ASSIGN(SandboxMountPointProvider); |
| 117 }; | 122 }; |
| 118 | 123 |
| 119 } // namespace fileapi | 124 } // namespace fileapi |
| 120 | 125 |
| 121 #endif // WEBKIT_FILEAPI_SANDBOX_MOUNT_POINT_PROVIDER_H_ | 126 #endif // WEBKIT_FILEAPI_SANDBOX_MOUNT_POINT_PROVIDER_H_ |
| 122 | 127 |
| OLD | NEW |