| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_TYPES_H_ | |
| 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_TYPES_H_ | |
| 7 | |
| 8 #include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h" | |
| 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystemType.h
" | |
| 10 | |
| 11 namespace fileapi { | |
| 12 | |
| 13 enum FileSystemType { | |
| 14 // Indicates uninitialized or invalid filesystem type. | |
| 15 kFileSystemTypeUnknown = -1, | |
| 16 | |
| 17 // ------------------------------------------------------------------------ | |
| 18 // Public FileSystem types, that are embedded in filesystem: URL and exposed | |
| 19 // to WebKit/renderer. Both Chrome and WebKit know how to handle these types. | |
| 20 | |
| 21 // Following two types are for TEMPORARY or PERSISTENT filesystems that | |
| 22 // can be used by webapps via standard app-facing API | |
| 23 // as defined in File API: Directories and System. | |
| 24 // http://www.w3.org/TR/file-system-api/#temporary-vs.-persistent-storage | |
| 25 // They are sandboxed filesystems; all the files in the filesystems are | |
| 26 // placed under the profile directory with path obfuscation and quota | |
| 27 // enforcement. | |
| 28 kFileSystemTypeTemporary = WebKit::WebFileSystemTypeTemporary, | |
| 29 kFileSystemTypePersistent = WebKit::WebFileSystemTypePersistent, | |
| 30 | |
| 31 // Indicates non-sandboxed isolated filesystem. | |
| 32 kFileSystemTypeIsolated = WebKit::WebFileSystemTypeIsolated, | |
| 33 | |
| 34 // Indicates non-sandboxed filesystem where files are placed outside the | |
| 35 // profile directory (thus called 'external' filesystem). | |
| 36 // This filesystem is used only by Chrome OS as of writing. | |
| 37 kFileSystemTypeExternal = WebKit::WebFileSystemTypeExternal, | |
| 38 | |
| 39 // ------------------------------------------------------------------------ | |
| 40 // Marks the beginning of internal type enum. (This is not the actual fs type) | |
| 41 kFileSystemInternalTypeEnumStart = 99, | |
| 42 | |
| 43 // Private FileSystem types, that should not appear in filesystem: URL as | |
| 44 // WebKit has no idea how to handle those types. | |
| 45 // | |
| 46 // One can register (mount) a new file system with a private file system type | |
| 47 // using IsolatedContext. Files in such file systems can be accessed via | |
| 48 // either Isolated or External public file system types (depending on | |
| 49 // how the file system is registered). | |
| 50 // See the comments for IsolatedContext and/or FileSystemURL for more details. | |
| 51 | |
| 52 // Should be used only for testing. | |
| 53 kFileSystemTypeTest, | |
| 54 | |
| 55 // Indicates a local filesystem where we can access files using native | |
| 56 // local path. | |
| 57 kFileSystemTypeNativeLocal, | |
| 58 | |
| 59 // Indicates a local filesystem where we can access files using native | |
| 60 // local path, but with restricted access. | |
| 61 // Restricted native local file system is in read-only mode. | |
| 62 kFileSystemTypeRestrictedNativeLocal, | |
| 63 | |
| 64 // Indicates a transient, isolated file system for dragged files (which could | |
| 65 // contain multiple dragged paths in the virtual root). | |
| 66 kFileSystemTypeDragged, | |
| 67 | |
| 68 // Indicates media filesystem which we can access with same manner to | |
| 69 // regular filesystem. | |
| 70 kFileSystemTypeNativeMedia, | |
| 71 | |
| 72 // Indicates media filesystem to which we need special protocol to access, | |
| 73 // such as MTP or PTP. | |
| 74 kFileSystemTypeDeviceMedia, | |
| 75 | |
| 76 // Indicates a Picasa virtual filesystem provided by Media Galleries API. | |
| 77 kFileSystemTypePicasa, | |
| 78 | |
| 79 // Indicates a synthetic iTunes filesystem. | |
| 80 kFileSystemTypeItunes, | |
| 81 | |
| 82 // Indicates a Drive filesystem which provides access to Google Drive. | |
| 83 kFileSystemTypeDrive, | |
| 84 | |
| 85 // Indicates a Syncable sandboxed filesystem which can be backed by a | |
| 86 // cloud storage service. | |
| 87 kFileSystemTypeSyncable, | |
| 88 | |
| 89 // Indicates an external filesystem accessible by file paths from platform | |
| 90 // Apps. As of writing, on non Chrome OS platform, this is merely a | |
| 91 // kFileSystemTypeNativeLocal. On Chrome OS, the path is parsed by | |
| 92 // the handlers of kFileSystemTypeExternal. | |
| 93 kFileSystemTypeNativeForPlatformApp, | |
| 94 | |
| 95 // Indicates an isolated filesystem which is supposed to contain one | |
| 96 // temporary which is supposed to go away when the last reference of | |
| 97 // its snapshot is dropped. | |
| 98 // This type is useful for creating a blob reference for a temporary | |
| 99 // file which must go away when the blob's last reference is dropped. | |
| 100 kFileSystemTypeForTransientFile, | |
| 101 | |
| 102 // -------------------------------------------------------------------- | |
| 103 // Marks the end of internal type enum. (This is not the actual fs type) | |
| 104 // New internal filesystem types must be added above this line. | |
| 105 kFileSystemInternalTypeEnumEnd, | |
| 106 }; | |
| 107 | |
| 108 } // namespace fileapi | |
| 109 | |
| 110 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_TYPES_H_ | |
| OLD | NEW |