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

Unified Diff: webkit/browser/fileapi/file_system_context.h

Issue 23856002: SyncFS: Support resolveLocalFileSystemURL on SyncFileSystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: webkit/browser/fileapi/file_system_context.h
diff --git a/webkit/browser/fileapi/file_system_context.h b/webkit/browser/fileapi/file_system_context.h
index 9762b68ebc1c15708c5318f4fa5b285c10a91227..21a31b89eb8be4e603ce3a068f8cd02cd4496bee 100644
--- a/webkit/browser/fileapi/file_system_context.h
+++ b/webkit/browser/fileapi/file_system_context.h
@@ -49,8 +49,8 @@ class CopyOrMoveFileValidatorFactory;
class ExternalFileSystemBackend;
class ExternalMountPoints;
class FileStreamWriter;
-class FileSystemFileUtil;
class FileSystemBackend;
+class FileSystemFileUtil;
class FileSystemOperation;
class FileSystemOperationRunner;
class FileSystemOptions;
@@ -61,6 +61,7 @@ class MountPoints;
class SandboxFileSystemBackend;
struct DefaultContextDeleter;
+struct FileSystemInfo;
// This class keeps and provides a file system context for FileSystem API.
// An instance of this class is created and owned by profile.
@@ -154,6 +155,12 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemContext
const std::string& name,
const GURL& root)> OpenFileSystemCallback;
+ // Used for ResolveURL.
+ typedef base::Callback<void(base::PlatformFileError result,
+ const FileSystemInfo& info,
+ const base::FilePath& file_path,
+ bool is_directory)> ResolveURLCallback;
+
// Used for DeleteFileSystem.
typedef base::Callback<void(base::PlatformFileError result)>
DeleteFileSystemCallback;
@@ -169,8 +176,15 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemContext
OpenFileSystemMode mode,
const OpenFileSystemCallback& callback);
+ // Opens the filesystem for the given |url| as read-only, and then checks the
+ // existence of the file entry referred by the URL. This should be called on
+ // the IO thread.
+ void ResolveURL(
+ const FileSystemURL& url,
+ const ResolveURLCallback& callback);
+
// Deletes the filesystem for the given |origin_url| and |type|. This should
- // be called on the IO Thread.
+ // be called on the IO thread.
void DeleteFileSystem(
const GURL& origin_url,
FileSystemType type,
@@ -274,6 +288,13 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemContext
// the constructor.
void RegisterBackend(FileSystemBackend* backend);
+ void DidOpenFileSystemForResolveURL(
+ const FileSystemURL& url,
+ const ResolveURLCallback& callback,
+ const GURL& filesystem_root,
+ const std::string& filesystem_name,
+ base::PlatformFileError error);
+
// Returns a FileSystemBackend, used only by test code.
SandboxFileSystemBackend* sandbox_backend() const {
return sandbox_backend_.get();

Powered by Google App Engine
This is Rietveld 408576698