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_FILE_SYSTEM_PATH_MANAGER_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ |
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/callback_old.h" | 9 #include "base/callback_old.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 // Checks if a given |name| contains any restricted names/chars in it. | 72 // Checks if a given |name| contains any restricted names/chars in it. |
73 bool IsRestrictedFileName(FileSystemType type, | 73 bool IsRestrictedFileName(FileSystemType type, |
74 const FilePath& filename); | 74 const FilePath& filename); |
75 | 75 |
76 // Checks if an origin has access to a particular filesystem type and | 76 // Checks if an origin has access to a particular filesystem type and |
77 // file element represented by |virtual_path|. | 77 // file element represented by |virtual_path|. |
78 bool IsAccessAllowed(const GURL& origin, FileSystemType type, | 78 bool IsAccessAllowed(const GURL& origin, FileSystemType type, |
79 const FilePath& virtual_path); | 79 const FilePath& virtual_path); |
80 | 80 |
81 FileSystemFileUtil* GetFileSystemFileUtil(FileSystemType type) const; | 81 FileSystemFileUtil* GetFileUtil(FileSystemType type) const; |
82 | 82 |
83 SandboxMountPointProvider* sandbox_provider() const { | 83 SandboxMountPointProvider* sandbox_provider() const { |
84 return sandbox_provider_.get(); | 84 return sandbox_provider_.get(); |
85 } | 85 } |
86 | 86 |
87 ExternalFileSystemMountPointProvider* external_provider() const { | 87 ExternalFileSystemMountPointProvider* external_provider() const { |
88 return external_provider_.get(); | 88 return external_provider_.get(); |
89 } | 89 } |
90 | 90 |
91 bool is_incognito() const { | 91 bool is_incognito() const { |
92 return is_incognito_; | 92 return is_incognito_; |
93 } | 93 } |
94 | 94 |
95 private: | 95 private: |
96 const bool is_incognito_; | 96 const bool is_incognito_; |
97 const bool allow_file_access_from_files_; | 97 const bool allow_file_access_from_files_; |
98 scoped_ptr<SandboxMountPointProvider> sandbox_provider_; | 98 scoped_ptr<SandboxMountPointProvider> sandbox_provider_; |
99 scoped_ptr<ExternalFileSystemMountPointProvider> external_provider_; | 99 scoped_ptr<ExternalFileSystemMountPointProvider> external_provider_; |
100 | 100 |
101 DISALLOW_COPY_AND_ASSIGN(FileSystemPathManager); | 101 DISALLOW_COPY_AND_ASSIGN(FileSystemPathManager); |
102 }; | 102 }; |
103 | 103 |
104 } // namespace fileapi | 104 } // namespace fileapi |
105 | 105 |
106 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ | 106 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ |
OLD | NEW |