1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPTIONS_H_
6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPTIONS_H_
11 #include "webkit/browser/webkit_storage_browser_export.h"
15 // Provides runtime options that may change FileSystem API behavior.
16 // This object is copyable.
17 class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemOptions
{
20 PROFILE_MODE_NORMAL
= 0,
21 PROFILE_MODE_INCOGNITO
24 // |profile_mode| specifies if the profile (for this filesystem)
25 // is running in incognito mode (PROFILE_MODE_INCOGNITO) or no
26 // (PROFILE_MODE_NORMAL).
27 // |additional_allowed_schemes| specifies schemes that are allowed
28 // to access FileSystem API in addition to "http" and "https".
30 ProfileMode profile_mode
,
31 const std::vector
<std::string
>& additional_allowed_schemes
);
35 // Returns true if it is running in the incognito mode.
36 bool is_incognito() const { return profile_mode_
== PROFILE_MODE_INCOGNITO
; }
38 // Returns the schemes that must be allowed to access FileSystem API
39 // in addition to standard "http" and "https".
40 // (e.g. If the --allow-file-access-from-files option is given in chrome
41 // "file" scheme will also need to be allowed).
42 const std::vector
<std::string
>& additional_allowed_schemes() const {
43 return additional_allowed_schemes_
;
47 const ProfileMode profile_mode_
;
48 const std::vector
<std::string
> additional_allowed_schemes_
;
51 } // namespace fileapi
53 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPTIONS_H_