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

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: rebased from patch 9016020 Created 9 years 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/fileapi/file_system_context.cc
diff --git a/webkit/fileapi/file_system_context.cc b/webkit/fileapi/file_system_context.cc
index b3d7d7e0658b3577809574b14d8ed6d7d0910c9c..b49740557d32bcf32382735250eaae57baa0f014 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"
@@ -172,6 +173,23 @@ void FileSystemContext::OpenFileSystem(
base::Owned(dispatcher), root_url, name));
}
+FileSystemOperationInterface* FileSystemContext::CreateFileSystemOperation(
+ const GURL& url,
+ 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(
+ url, dispatcher, file_proxy, this);
+}
+
} // namespace fileapi
COMPILE_ASSERT(int(WebKit::WebFileSystem::TypeTemporary) == \

Powered by Google App Engine
This is Rietveld 408576698