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

Unified Diff: webkit/chromeos/fileapi/cros_mount_point_provider.cc

Issue 10082002: Add FileSystemMountPointProvider::CreateFileReader() which returns appropriate Reader instance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 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 | « webkit/chromeos/fileapi/cros_mount_point_provider.h ('k') | webkit/fileapi/file_system_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/chromeos/fileapi/cros_mount_point_provider.cc
diff --git a/webkit/chromeos/fileapi/cros_mount_point_provider.cc b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
index 74d0849e016188f217775afe5030b0dffa8920da..e73516f936567b8219ba28fcb435c243df5a5d01 100644
--- a/webkit/chromeos/fileapi/cros_mount_point_provider.cc
+++ b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
@@ -18,6 +18,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "webkit/chromeos/fileapi/file_access_permissions.h"
#include "webkit/chromeos/fileapi/remote_file_system_operation.h"
+#include "webkit/fileapi/file_system_file_reader.h"
#include "webkit/fileapi/file_system_operation.h"
#include "webkit/fileapi/file_system_util.h"
#include "webkit/fileapi/native_file_util.h"
@@ -252,6 +253,17 @@ CrosMountPointProvider::CreateFileSystemOperation(
return new fileapi::FileSystemOperation(file_proxy, context);
}
+webkit_blob::FileReader* CrosMountPointProvider::CreateFileReader(
+ const GURL& url,
+ int64 offset,
+ base::MessageLoopProxy* file_proxy,
+ fileapi::FileSystemContext* context) const {
+ // For now we return a generic Reader implementation which utilizes
+ // CreateSnapshotFile internally (i.e. will download everything first).
+ // TODO(satorux,zel): implement more efficient reader for remote cases.
+ return new fileapi::FileSystemFileReader(file_proxy, context, url, offset);
+}
+
bool CrosMountPointProvider::GetVirtualPath(const FilePath& filesystem_path,
FilePath* virtual_path) {
for (MountPointMap::const_iterator iter = mount_point_map_.begin();
« no previous file with comments | « webkit/chromeos/fileapi/cros_mount_point_provider.h ('k') | webkit/fileapi/file_system_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698