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

Unified Diff: webkit/fileapi/file_system_context.cc

Issue 8999017: Add CreateFileSystemOperation() method to FileSystemContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang build fix Created 8 years, 11 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 | « webkit/fileapi/file_system_context.h ('k') | webkit/fileapi/file_system_dir_url_request_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_context.cc
diff --git a/webkit/fileapi/file_system_context.cc b/webkit/fileapi/file_system_context.cc
index 7cdc66dd52d042f407b2af281460268f932d720a..3abc454fdd15b8c75e1809f28eac6d63de582d9e 100644
--- a/webkit/fileapi/file_system_context.cc
+++ b/webkit/fileapi/file_system_context.cc
@@ -11,6 +11,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSystem.h"
#include "webkit/fileapi/file_system_callback_dispatcher.h"
#include "webkit/fileapi/file_system_file_util.h"
+#include "webkit/fileapi/file_system_operation_interface.h"
#include "webkit/fileapi/file_system_options.h"
#include "webkit/fileapi/file_system_quota_client.h"
#include "webkit/fileapi/file_system_util.h"
@@ -159,6 +160,7 @@ void FileSystemContext::OpenFileSystem(
bool create,
scoped_ptr<FileSystemCallbackDispatcher> dispatcher) {
DCHECK(dispatcher.get());
+
FileSystemMountPointProvider* mount_point_provider =
GetMountPointProvider(type);
if (!mount_point_provider) {
@@ -175,6 +177,24 @@ void FileSystemContext::OpenFileSystem(
base::Passed(&dispatcher), root_url, name));
}
+FileSystemOperationInterface* FileSystemContext::CreateFileSystemOperation(
+ const GURL& url,
+ scoped_ptr<FileSystemCallbackDispatcher> dispatcher,
+ base::MessageLoopProxy* file_proxy) {
+ GURL origin_url;
+ FileSystemType file_system_type = kFileSystemTypeUnknown;
+ FilePath file_path;
+ if (!CrackFileSystemURL(url, &origin_url, &file_system_type, &file_path))
+ return NULL;
+ FileSystemMountPointProvider* mount_point_provider =
+ GetMountPointProvider(file_system_type);
+ if (!mount_point_provider)
+ return NULL;
+ return mount_point_provider->CreateFileSystemOperation(
+ origin_url, file_system_type, file_path,
+ dispatcher.Pass(), file_proxy, this);
+}
+
} // namespace fileapi
COMPILE_ASSERT(int(WebKit::WebFileSystem::TypeTemporary) == \
« no previous file with comments | « webkit/fileapi/file_system_context.h ('k') | webkit/fileapi/file_system_dir_url_request_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698