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

Side by Side Diff: webkit/fileapi/file_system_options.h

Issue 9004019: Cleanup: Removing FileSystemPathManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_OPTIONS_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPTIONS_H_
7
8 #include <string>
9 #include <vector>
10
11 namespace fileapi {
12
13 // Provides runtime options that may change FileSystem API behavior.
14 // This object is copyable.
15 class FileSystemOptions {
16 public:
17 enum ProfileMode {
18 PROFILE_MODE_NORMAL = 0,
19 PROFILE_MODE_INCOGNITO
20 };
21
22 // |profile_mode| specifies if the profile (for this filesystem)
23 // is running in incognito mode (PROFILE_MODE_INCOGNITO) or no
24 // (PROFILE_MODE_NORMAL).
25 // |additional_allowed_schemes| specifies schemes that are allowed
26 // to access FileSystem API in addition to "http" and "https".
27 FileSystemOptions(
28 ProfileMode profile_mode,
29 const std::vector<std::string>& additional_allowed_schemes);
30
31 ~FileSystemOptions();
32
33 // Returns true if it is running in the incognito mode.
34 bool is_incognito() const { return profile_mode_ == PROFILE_MODE_INCOGNITO; }
35
36 // Returns the schemes that must be allowed to access FileSystem API
37 // in addition to standard "http" and "https".
38 // (e.g. If the --allow-file-access-from-files option is given in chrome
39 // "file" scheme will also need to be allowed).
40 const std::vector<std::string>& additional_allowed_schemes() const {
41 return additional_allowed_schemes_;
42 }
43
44 private:
45 const ProfileMode profile_mode_;
46 const std::vector<std::string> additional_allowed_schemes_;
47 };
48
49 } // namespace fileapi
50
51 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPTIONS_H_
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_operation_write_unittest.cc ('k') | webkit/fileapi/file_system_options.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698