1 // Copyright 2013 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 #include "ppapi/shared_impl/file_system_util.h"
7 #include "base/logging.h"
11 bool FileSystemTypeIsValid(PP_FileSystemType type
) {
12 return (type
== PP_FILESYSTEMTYPE_LOCALPERSISTENT
||
13 type
== PP_FILESYSTEMTYPE_LOCALTEMPORARY
||
14 type
== PP_FILESYSTEMTYPE_EXTERNAL
||
15 type
== PP_FILESYSTEMTYPE_ISOLATED
);
18 bool FileSystemTypeHasQuota(PP_FileSystemType type
) {
19 return (type
== PP_FILESYSTEMTYPE_LOCALTEMPORARY
||
20 type
== PP_FILESYSTEMTYPE_LOCALPERSISTENT
);
23 std::string
IsolatedFileSystemTypeToRootName(
24 PP_IsolatedFileSystemType_Private type
) {
26 case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_CRX
:
28 case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_PLUGINPRIVATE
:
29 return "pluginprivate";