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

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

Issue 242443004: Remove thread restriction of fileapi::FileSystemContext::ResolveURL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment. Created 6 years, 8 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
« no previous file with comments | « content/browser/fileapi/fileapi_message_filter.cc ('k') | webkit/browser/fileapi/file_system_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ba91af7ef97b9510c00018581b385c2a5988d990..c5b5ee34e9cb97f3b56fabefcfa6498a74f2b141 100644
--- a/webkit/browser/fileapi/file_system_context.h
+++ b/webkit/browser/fileapi/file_system_context.h
@@ -188,10 +188,15 @@ class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemContext
OpenFileSystemCallback;
// Used for ResolveURL.
+ enum ResolvedEntryType {
+ RESOLVED_ENTRY_FILE,
+ RESOLVED_ENTRY_DIRECTORY,
+ RESOLVED_ENTRY_NOT_FOUND,
+ };
typedef base::Callback<void(base::File::Error result,
const FileSystemInfo& info,
const base::FilePath& file_path,
- bool is_directory)> ResolveURLCallback;
+ ResolvedEntryType type)> ResolveURLCallback;
// Used for DeleteFileSystem and OpenPluginPrivateFileSystem.
typedef base::Callback<void(base::File::Error result)> StatusCallback;
@@ -207,9 +212,11 @@ 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.
+ // Opens the filesystem for the given |url| as read-only. It succeeds even if
+ // the entry referred by the URL does not exist, but in that case
kinuko 2014/04/21 10:01:37 nit: this might be read it could always succeed, i
kinaba 2014/04/22 00:32:54 Done.
+ // RESOLVED_ENTRY_NOT_FOUND type is returned to the callback for indicating
+ // the absence. Can be called from any thread with a message loop. |callback|
+ // is invoked on the caller thread.
void ResolveURL(
const FileSystemURL& url,
const ResolveURLCallback& callback);
« no previous file with comments | « content/browser/fileapi/fileapi_message_filter.cc ('k') | webkit/browser/fileapi/file_system_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698