| Index: chrome/browser/extensions/api/file_system/file_system_api.h
|
| diff --git a/chrome/browser/extensions/api/file_system/file_system_api.h b/chrome/browser/extensions/api/file_system/file_system_api.h
|
| index 0dad0c025d92e9ecfad31c502333abdc6307ddd8..154c6d0cd5f7d14e021c57af94f8639155cf35c4 100644
|
| --- a/chrome/browser/extensions/api/file_system/file_system_api.h
|
| +++ b/chrome/browser/extensions/api/file_system/file_system_api.h
|
| @@ -44,6 +44,15 @@ class FileSystemEntryFunction : public AsyncExtensionFunction {
|
| void RegisterFileSystemAndSendResponse(const base::FilePath& path,
|
| EntryType entry_type);
|
|
|
| + // This will finish the choose file process. This is either called directly
|
| + // from FileSelected, or from CreateFileIfNecessary. It is called on the UI
|
| + // thread. |id_override| specifies the id to send in the response instead of
|
| + // the generated id.
|
| + void RegisterFileSystemAndSendResponseWithIdOverride(
|
| + const base::FilePath& path,
|
| + EntryType entry_type,
|
| + const std::string& id_override);
|
| +
|
| // called on the UI thread if there is a problem checking a writable file.
|
| void HandleWritableFileError();
|
| };
|
| @@ -115,6 +124,38 @@ class FileSystemChooseEntryFunction : public FileSystemEntryFunction {
|
| base::FilePath initial_path_;
|
| };
|
|
|
| +class FileSystemRetainEntryFunction : public SyncExtensionFunction {
|
| + public:
|
| + DECLARE_EXTENSION_FUNCTION("fileSystem.retainEntry", FILESYSTEM_RETAINENTRY)
|
| +
|
| + protected:
|
| + virtual ~FileSystemRetainEntryFunction() {}
|
| + virtual bool RunImpl() OVERRIDE;
|
| +
|
| + private:
|
| + // Retains the file entry referenced by |entry_id| in apps::SavedFilesService.
|
| + // |entry_id| must refer to an entry in an isolated file system.
|
| + bool RetainFileEntry(const std::string& entry_id);
|
| +};
|
| +
|
| +class FileSystemIsRestorableFunction : public SyncExtensionFunction {
|
| + public:
|
| + DECLARE_EXTENSION_FUNCTION("fileSystem.isRestorable", FILESYSTEM_ISRESTORABLE)
|
| +
|
| + protected:
|
| + virtual ~FileSystemIsRestorableFunction() {}
|
| + virtual bool RunImpl() OVERRIDE;
|
| +};
|
| +
|
| +class FileSystemRestoreEntryFunction : public FileSystemEntryFunction {
|
| + public:
|
| + DECLARE_EXTENSION_FUNCTION("fileSystem.restoreEntry", FILESYSTEM_RESTOREENTRY)
|
| +
|
| + protected:
|
| + virtual ~FileSystemRestoreEntryFunction() {}
|
| + virtual bool RunImpl() OVERRIDE;
|
| +};
|
| +
|
| } // namespace extensions
|
|
|
| #endif // CHROME_BROWSER_EXTENSIONS_API_FILE_SYSTEM_FILE_SYSTEM_API_H_
|
|
|