diff options
Diffstat (limited to 'webkit/fileapi/file_system_path_manager.h')
-rw-r--r-- | webkit/fileapi/file_system_path_manager.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/webkit/fileapi/file_system_path_manager.h b/webkit/fileapi/file_system_path_manager.h index be9ceff..28082aa 100644 --- a/webkit/fileapi/file_system_path_manager.h +++ b/webkit/fileapi/file_system_path_manager.h @@ -4,10 +4,11 @@ #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ #define WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ +#pragma once #include "base/callback.h" #include "base/file_path.h" -#include "base/scoped_ptr.h" +#include "base/file_util.h" #include "webkit/fileapi/file_system_types.h" class GURL; @@ -18,6 +19,9 @@ class MessageLoopProxy; namespace fileapi { +// TODO(kinuko): Probably this module must be called FileSystemPathUtil +// or something similar. + // An interface to construct or crack sandboxed filesystem paths. // Currently each sandboxed filesystem path looks like: // @@ -96,6 +100,25 @@ class FileSystemPathManager { const std::string& origin_identifier, fileapi::FileSystemType type); + // Enumerates origins under the given |base_path|. + // This must be used on the FILE thread. + class OriginEnumerator { + public: + OriginEnumerator(const FilePath& base_path); + + // Returns the next origin identifier. Returns empty if there are no + // more origins. + std::string Next(); + + bool HasTemporary(); + bool HasPersistent(); + const FilePath& path() { return current_; } + + private: + file_util::FileEnumerator enumerator_; + FilePath current_; + }; + private: class GetFileSystemRootPathTask; |