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

Unified Diff: webkit/fileapi/file_permission_policy.h

Issue 11804005: Cleanup file permission check code in FileAPIMessageFilter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cros+native-local perm fix Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/chromeos/fileapi/cros_mount_point_provider.cc ('k') | webkit/fileapi/file_permission_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_permission_policy.h
diff --git a/webkit/fileapi/file_permission_policy.h b/webkit/fileapi/file_permission_policy.h
new file mode 100644
index 0000000000000000000000000000000000000000..df8e63efbb3b47a105f30f4347d78bdaa98f0e1d
--- /dev/null
+++ b/webkit/fileapi/file_permission_policy.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_FILEAPI_FILE_PERMISSION_POLICY_H_
+#define WEBKIT_FILEAPI_FILE_PERMISSION_POLICY_H_
+
+#include "webkit/storage/webkit_storage_export.h"
+
+namespace fileapi {
+
+WEBKIT_STORAGE_EXPORT extern const int kReadFilePermissions;
+WEBKIT_STORAGE_EXPORT extern const int kWriteFilePermissions;
+WEBKIT_STORAGE_EXPORT extern const int kCreateFilePermissions;
+WEBKIT_STORAGE_EXPORT extern const int kOpenFilePermissions;
+
+enum FilePermissionPolicy {
+ // Any access should be always denied.
+ FILE_PERMISSION_ALWAYS_DENY,
+
+ // Any access should be always allowed. (This should be used only for
+ // access to sandbox directories.)
+ FILE_PERMISSION_ALWAYS_ALLOW,
+
+ // Access should be examined by per-file permission policy.
+ FILE_PERMISSION_USE_FILE_PERMISSION,
+
+ // Access should be examined by per-filesystem permission policy.
+ FILE_PERMISSION_USE_FILESYSTEM_PERMISSION,
+};
+
+} // namespace fileapi
+
+#endif // WEBKIT_FILEAPI_FILE_PERMISSION_POLICY_H_
« no previous file with comments | « webkit/chromeos/fileapi/cros_mount_point_provider.cc ('k') | webkit/fileapi/file_permission_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698