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

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

Issue 10197007: Change webkit/{fileapi,quota} code to use TaskRunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix 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
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 e73516f936567b8219ba28fcb435c243df5a5d01..b7fecd66307ddcc0e324657208c26f0707f25a3b 100644
--- a/webkit/chromeos/fileapi/cros_mount_point_provider.cc
+++ b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
@@ -8,9 +8,9 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
-#include "base/message_loop_proxy.h"
#include "base/stringprintf.h"
#include "base/synchronization/lock.h"
+#include "base/task_runner.h"
#include "base/utf_string_conversions.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h"
@@ -244,13 +244,24 @@ CrosMountPointProvider::CreateFileSystemOperation(
const GURL& origin_url,
fileapi::FileSystemType file_system_type,
const FilePath& virtual_path,
- base::MessageLoopProxy* file_proxy,
+ base::TaskRunner* task_runner,
fileapi::FileSystemContext* context) const {
const MountPoint* mount_point = GetMountPoint(virtual_path);
if (mount_point && mount_point->location == REMOTE)
return new chromeos::RemoteFileSystemOperation(mount_point->remote_proxy);
- return new fileapi::FileSystemOperation(file_proxy, context);
+ return new fileapi::FileSystemOperation(task_runner, context);
+}
+
+webkit_blob::FileReader* CrosMountPointProvider::CreateFileReader(
+ const GURL& url,
+ int64 offset,
+ base::TaskRunner* task_runner,
+ 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(task_runner, context, url, offset);
}
webkit_blob::FileReader* CrosMountPointProvider::CreateFileReader(

Powered by Google App Engine
This is Rietveld 408576698