OLD | NEW |
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_FILE_PERMISSION_POLICY_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_PERMISSION_POLICY_H_ |
6 #define WEBKIT_BROWSER_FILEAPI_FILE_PERMISSION_POLICY_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_FILE_PERMISSION_POLICY_H_ |
7 | 7 |
8 #include "webkit/browser/webkit_storage_browser_export.h" | 8 #include "webkit/browser/webkit_storage_browser_export.h" |
9 | 9 |
10 namespace fileapi { | 10 namespace fileapi { |
11 | 11 |
12 WEBKIT_STORAGE_BROWSER_EXPORT extern const int kReadFilePermissions; | 12 WEBKIT_STORAGE_BROWSER_EXPORT extern const int kReadFilePermissions; |
13 WEBKIT_STORAGE_BROWSER_EXPORT extern const int kWriteFilePermissions; | 13 WEBKIT_STORAGE_BROWSER_EXPORT extern const int kWriteFilePermissions; |
14 WEBKIT_STORAGE_BROWSER_EXPORT extern const int kCreateFilePermissions; | 14 WEBKIT_STORAGE_BROWSER_EXPORT extern const int kCreateFilePermissions; |
15 WEBKIT_STORAGE_BROWSER_EXPORT extern const int kOpenFilePermissions; | 15 WEBKIT_STORAGE_BROWSER_EXPORT extern const int kOpenPepperFilePermissions; |
16 | 16 |
17 enum FilePermissionPolicy { | 17 enum FilePermissionPolicy { |
18 // Any access should be always denied. | 18 // Any access should be always denied. |
19 FILE_PERMISSION_ALWAYS_DENY = 0x0, | 19 FILE_PERMISSION_ALWAYS_DENY = 0x0, |
20 | 20 |
21 // Access is sandboxed, no extra permission check is necessary. | 21 // Access is sandboxed, no extra permission check is necessary. |
22 FILE_PERMISSION_SANDBOX = 1 << 0, | 22 FILE_PERMISSION_SANDBOX = 1 << 0, |
23 | 23 |
24 // Access should be restricted to read-only. | 24 // Access should be restricted to read-only. |
25 FILE_PERMISSION_READ_ONLY = 1 << 1, | 25 FILE_PERMISSION_READ_ONLY = 1 << 1, |
26 | 26 |
27 // Access should be examined by per-file permission policy. | 27 // Access should be examined by per-file permission policy. |
28 FILE_PERMISSION_USE_FILE_PERMISSION = 1 << 2, | 28 FILE_PERMISSION_USE_FILE_PERMISSION = 1 << 2, |
29 }; | 29 }; |
30 | 30 |
31 } // namespace fileapi | 31 } // namespace fileapi |
32 | 32 |
33 #endif // WEBKIT_BROWSER_FILEAPI_FILE_PERMISSION_POLICY_H_ | 33 #endif // WEBKIT_BROWSER_FILEAPI_FILE_PERMISSION_POLICY_H_ |
OLD | NEW |