summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/sandbox_mount_point_provider.h
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-05 11:45:55 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-05 11:45:55 +0000
commite7e46736cc27f6499d89141eb9e546866ba24754 (patch)
tree49ef8f4acebc8e0a6949802dec6fac9ff8369f71 /webkit/fileapi/sandbox_mount_point_provider.h
parent3465d85d92cf1e3e90f882806fd1758d3132441b (diff)
downloadchromium_src-e7e46736cc27f6499d89141eb9e546866ba24754.zip
chromium_src-e7e46736cc27f6499d89141eb9e546866ba24754.tar.gz
chromium_src-e7e46736cc27f6499d89141eb9e546866ba24754.tar.bz2
Cleanup: Removing FileSystemPathManager
- Deprecating FileSystemPathManager, which I believe no longer has a lot of reasons to exist * Changed GetFileSystemTypeString to a regular function in file_system_util * Added GetFileUtil(FileSystemType), GetMountPointProvider(FileSystemType), external_provider() to FileSystemContext * Moved all the tests in file_system_path_manager_unittest to file_system_mount_point_provider_unittest - Also replaced two boolean values in FileSystemContext with a thin FileSystemOptions interface BUG=none TEST=no functional changes Review URL: http://codereview.chromium.org/9004019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116482 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/sandbox_mount_point_provider.h')
-rw-r--r--webkit/fileapi/sandbox_mount_point_provider.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/webkit/fileapi/sandbox_mount_point_provider.h b/webkit/fileapi/sandbox_mount_point_provider.h
index 5fa76ab2..e7db7b9 100644
--- a/webkit/fileapi/sandbox_mount_point_provider.h
+++ b/webkit/fileapi/sandbox_mount_point_provider.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -13,6 +13,7 @@
#include "base/memory/scoped_ptr.h"
#include "googleurl/src/gurl.h"
#include "webkit/fileapi/file_system_mount_point_provider.h"
+#include "webkit/fileapi/file_system_options.h"
#include "webkit/fileapi/file_system_quota_util.h"
namespace base {
@@ -36,6 +37,8 @@ class SandboxMountPointProvider
: public FileSystemMountPointProvider,
public FileSystemQuotaUtil {
public:
+ typedef FileSystemMountPointProvider::GetRootPathCallback GetRootPathCallback;
+
// Origin enumerator interface.
// An instance of this interface is assumed to be called on the file thread.
class OriginEnumerator {
@@ -58,9 +61,9 @@ class SandboxMountPointProvider
static const FilePath::CharType kRenamedOldFileSystemDirectory[];
SandboxMountPointProvider(
- FileSystemPathManager* path_manager,
scoped_refptr<base::MessageLoopProxy> file_message_loop,
- const FilePath& profile_path);
+ const FilePath& profile_path,
+ const FileSystemOptions& file_system_options);
virtual ~SandboxMountPointProvider();
// FileSystemMountPointProvider overrides.
@@ -72,7 +75,7 @@ class SandboxMountPointProvider
const GURL& origin_url,
FileSystemType type,
bool create,
- const FileSystemPathManager::GetRootPathCallback& callback) OVERRIDE;
+ const GetRootPathCallback& callback) OVERRIDE;
virtual FilePath ValidateFileSystemRootAndGetPathOnFileThread(
const GURL& origin_url,
FileSystemType type,
@@ -148,20 +151,22 @@ class SandboxMountPointProvider
FilePath OldCreateFileSystemRootPath(
const GURL& origin_url, FileSystemType type);
+ // Returns true if the given |url|'s scheme is allowed to access
+ // filesystem.
+ bool IsAllowedScheme(const GURL& url) const;
+
class GetFileSystemRootPathTask;
friend class FileSystemTestOriginHelper;
friend class SandboxMountPointProviderMigrationTest;
friend class SandboxMountPointProviderOriginEnumeratorTest;
- // The path_manager_ isn't owned by this instance; this instance is owned by
- // the path_manager_, and they have the same lifetime.
- FileSystemPathManager* path_manager_;
-
scoped_refptr<base::MessageLoopProxy> file_message_loop_;
const FilePath profile_path_;
+ FileSystemOptions file_system_options_;
+
scoped_refptr<ObfuscatedFileUtil> sandbox_file_util_;
// Acccessed only on the file thread.