summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_test_helper.h
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-26 11:53:50 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-26 11:53:50 +0000
commit08f8feb39b2c8801dd39a1531fb5958644162e6d (patch)
tree8353404b39167b55fde8adb6c3d0b24b4fccdfee /webkit/fileapi/file_system_test_helper.h
parentf516f4e5d8eff9285234cf18a62108d18229367c (diff)
downloadchromium_src-08f8feb39b2c8801dd39a1531fb5958644162e6d.zip
chromium_src-08f8feb39b2c8801dd39a1531fb5958644162e6d.tar.gz
chromium_src-08f8feb39b2c8801dd39a1531fb5958644162e6d.tar.bz2
Move src/dest info out of FileSystemOperationContext
Current FileSystemOperationContext has both src and dest path file info in it but this is making the code for cross-FileUtil operations way complex. This patch removes src/dest information from FileSystemOperationContext and instead: - introduce new FileSystemPath class, which represents a file path information in a filesystem - replace all the FilePath args in FileSystemFileUtil with FileSystemPath The resulting code still has some ugly part, and if we get rid of cross-FU operations from each FU code eventually we may end up converting FileSystemPath back to FilePath, but I think this change is not far from the way we want to go. BUG=114732, 110121 TEST=existing tests Review URL: http://codereview.chromium.org/9413009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123689 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/file_system_test_helper.h')
-rw-r--r--webkit/fileapi/file_system_test_helper.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/webkit/fileapi/file_system_test_helper.h b/webkit/fileapi/file_system_test_helper.h
index 10ec99d..af654ce 100644
--- a/webkit/fileapi/file_system_test_helper.h
+++ b/webkit/fileapi/file_system_test_helper.h
@@ -12,6 +12,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "googleurl/src/gurl.h"
+#include "webkit/fileapi/file_system_path.h"
#include "webkit/fileapi/file_system_types.h"
#include "webkit/fileapi/file_system_util.h"
#include "webkit/quota/quota_types.h"
@@ -56,6 +57,12 @@ class FileSystemTestOriginHelper {
GURL GetURLForPath(const FilePath& path) const;
FilePath GetUsageCachePath() const;
+ // Creates a new FileSystemPath for the given |path|.
+ FileSystemPath CreatePath(const FilePath& path) const;
+ FileSystemPath CreatePathFromUTF8(const std::string& utf8) const {
+ return CreatePath(FilePath::FromUTF8Unsafe(utf8));
+ }
+
int64 GetCachedOriginUsage() const;
bool RevokeUsageCache() const;
@@ -77,8 +84,6 @@ class FileSystemTestOriginHelper {
FileSystemFileUtil* file_util() { return file_util_; }
private:
- void InitializeOperationContext(FileSystemOperationContext* context);
-
scoped_refptr<FileSystemContext> file_system_context_;
const GURL origin_;
const FileSystemType type_;