summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_permission_policy.h
blob: df8e63efbb3b47a105f30f4347d78bdaa98f0e1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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_