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

Side by Side Diff: ppapi/shared_impl/file_system_util.cc

Issue 1979733002: Add ability to clear content licenses (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: seperate file Created 4 years, 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/shared_impl/file_system_util.h" 5 #include "ppapi/shared_impl/file_system_util.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ppapi/shared_impl/ppapi_constants.h"
8 9
9 namespace ppapi { 10 namespace ppapi {
10 11
11 bool FileSystemTypeIsValid(PP_FileSystemType type) { 12 bool FileSystemTypeIsValid(PP_FileSystemType type) {
12 return (type == PP_FILESYSTEMTYPE_LOCALPERSISTENT || 13 return (type == PP_FILESYSTEMTYPE_LOCALPERSISTENT ||
13 type == PP_FILESYSTEMTYPE_LOCALTEMPORARY || 14 type == PP_FILESYSTEMTYPE_LOCALTEMPORARY ||
14 type == PP_FILESYSTEMTYPE_EXTERNAL || 15 type == PP_FILESYSTEMTYPE_EXTERNAL ||
15 type == PP_FILESYSTEMTYPE_ISOLATED); 16 type == PP_FILESYSTEMTYPE_ISOLATED);
16 } 17 }
17 18
18 bool FileSystemTypeHasQuota(PP_FileSystemType type) { 19 bool FileSystemTypeHasQuota(PP_FileSystemType type) {
19 return (type == PP_FILESYSTEMTYPE_LOCALTEMPORARY || 20 return (type == PP_FILESYSTEMTYPE_LOCALTEMPORARY ||
20 type == PP_FILESYSTEMTYPE_LOCALPERSISTENT); 21 type == PP_FILESYSTEMTYPE_LOCALPERSISTENT);
21 } 22 }
22 23
23 std::string IsolatedFileSystemTypeToRootName( 24 std::string IsolatedFileSystemTypeToRootName(
24 PP_IsolatedFileSystemType_Private type) { 25 PP_IsolatedFileSystemType_Private type) {
25 switch (type) { 26 switch (type) {
26 case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_CRX: 27 case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_CRX:
27 return "crxfs"; 28 return "crxfs";
28 case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_PLUGINPRIVATE: 29 case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_PLUGINPRIVATE:
29 return "pluginprivate"; 30 return kPluginPrivateRootName;
30 default: 31 default:
31 NOTREACHED() << type; 32 NOTREACHED() << type;
32 return std::string(); 33 return std::string();
33 } 34 }
34 } 35 }
35 36
36 } // namespace ppapi 37 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698