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

Unified Diff: webkit/fileapi/test_mount_point_provider.h

Issue 10386069: Add RegisterMountPointProvider and TestMountPointProvider for testing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 8 years, 7 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/sandbox_mount_point_provider.cc ('k') | webkit/fileapi/test_mount_point_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/test_mount_point_provider.h
diff --git a/webkit/fileapi/isolated_mount_point_provider.h b/webkit/fileapi/test_mount_point_provider.h
similarity index 66%
copy from webkit/fileapi/isolated_mount_point_provider.h
copy to webkit/fileapi/test_mount_point_provider.h
index d43daf4c72e315af04a72d57f7ec2b2e160133ba..570f70e3d8ac56994134685f058f4b653ca1756b 100644
--- a/webkit/fileapi/isolated_mount_point_provider.h
+++ b/webkit/fileapi/test_mount_point_provider.h
@@ -2,25 +2,35 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_FILEAPI_ISOLATED_MOUNT_POINT_PROVIDER_H_
-#define WEBKIT_FILEAPI_ISOLATED_MOUNT_POINT_PROVIDER_H_
-
-#include <vector>
+#ifndef WEBKIT_FILEAPI_TEST_MOUNT_POINT_PROVIDER_H_
+#define WEBKIT_FILEAPI_TEST_MOUNT_POINT_PROVIDER_H_
+#pragma once
+#include "base/file_path.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "webkit/fileapi/file_system_mount_point_provider.h"
+namespace base {
+class SequencedTaskRunner;
+}
+
namespace fileapi {
-class IsolatedContext;
+class FileSystemQuotaUtil;
-class IsolatedMountPointProvider : public FileSystemMountPointProvider {
+// This should be only used for testing.
+// This mount point provider uses LocalFileUtil and stores data file
+// under the given directory.
+class TestMountPointProvider : public FileSystemMountPointProvider {
public:
typedef FileSystemMountPointProvider::ValidateFileSystemCallback
ValidateFileSystemCallback;
- IsolatedMountPointProvider();
- virtual ~IsolatedMountPointProvider();
+ TestMountPointProvider(
+ base::SequencedTaskRunner* task_runner,
+ const FilePath& base_path);
+ virtual ~TestMountPointProvider();
// FileSystemMountPointProvider implementation.
virtual void ValidateFileSystemRoot(
@@ -50,13 +60,14 @@ class IsolatedMountPointProvider : public FileSystemMountPointProvider {
const GURL& url,
int64 offset,
FileSystemContext* context) const OVERRIDE;
+ virtual FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE;
private:
- IsolatedContext* isolated_context() const;
-
- scoped_ptr<FileSystemFileUtil> isolated_file_util_;
+ FilePath base_path_;
+ scoped_ptr<FileSystemFileUtil> local_file_util_;
+ scoped_ptr<FileSystemQuotaUtil> quota_util_;
};
} // namespace fileapi
-#endif // WEBKIT_FILEAPI_ISOLATED_MOUNT_POINT_PROVIDER_H_
+#endif // WEBKIT_FILEAPI_TEST_MOUNT_POINT_PROVIDER_H_
« no previous file with comments | « webkit/fileapi/sandbox_mount_point_provider.cc ('k') | webkit/fileapi/test_mount_point_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698