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/browser/fileapi/sandbox_file_system_backend.h

Issue 21116008: FileAPI: Move FileSystemQuotaUtil related functions into SandboxContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/browser/fileapi/sandbox_file_system_backend.h
diff --git a/webkit/browser/fileapi/sandbox_file_system_backend.h b/webkit/browser/fileapi/sandbox_file_system_backend.h
index f1a7a55cfb12470bb4f9df09a7bab37523d7883d..ba6911e2b79c67301e5a9d130f9b1f5c87ec7136 100644
--- a/webkit/browser/fileapi/sandbox_file_system_backend.h
+++ b/webkit/browser/fileapi/sandbox_file_system_backend.h
@@ -16,8 +16,8 @@
#include "base/memory/weak_ptr.h"
#include "url/gurl.h"
#include "webkit/browser/fileapi/file_system_backend.h"
-#include "webkit/browser/fileapi/file_system_options.h"
#include "webkit/browser/fileapi/file_system_quota_util.h"
+#include "webkit/browser/fileapi/sandbox_context.h"
#include "webkit/browser/fileapi/task_runner_bound_observer_list.h"
#include "webkit/browser/quota/special_storage_policy.h"
#include "webkit/browser/webkit_storage_browser_export.h"
@@ -53,22 +53,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackend
: public FileSystemBackend,
public FileSystemQuotaUtil {
public:
- // Origin enumerator interface.
- // An instance of this interface is assumed to be called on the file thread.
- class OriginEnumerator {
- public:
- virtual ~OriginEnumerator() {}
-
- // Returns the next origin. Returns empty if there are no more origins.
- virtual GURL Next() = 0;
-
- // Returns the current origin's information.
- virtual bool HasFileSystemType(FileSystemType type) const = 0;
- };
-
- SandboxFileSystemBackend(
- SandboxContext* sandbox_context,
- const FileSystemOptions& file_system_options);
+ SandboxFileSystemBackend(SandboxContext* sandbox_context);
virtual ~SandboxFileSystemBackend();
// FileSystemBackend overrides.
@@ -101,18 +86,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackend
// Returns an origin enumerator of this backend.
// This method can only be called on the file thread.
- OriginEnumerator* CreateOriginEnumerator();
-
- // Gets a base directory path of the sandboxed filesystem that is
- // specified by |origin_url| and |type|.
- // (The path is similar to the origin's root path but doesn't contain
- // the 'unique' part.)
- // Returns an empty path if the given type is invalid.
- // This method can only be called on the file thread.
- base::FilePath GetBaseDirectoryForOriginAndType(
- const GURL& origin_url,
- FileSystemType type,
- bool create);
+ SandboxContext::OriginEnumerator* CreateOriginEnumerator();
// FileSystemQuotaUtil overrides.
virtual base::PlatformFileError DeleteOriginDataOnFileThread(
@@ -189,26 +163,11 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackend
bool IsAllowedScheme(const GURL& url) const;
ObfuscatedFileUtil* sandbox_sync_file_util();
- FileSystemUsageCache* usage_cache();
-
- static void InvalidateUsageCacheOnFileThread(
- ObfuscatedFileUtil* file_util,
- const GURL& origin,
- FileSystemType type,
- FileSystemUsageCache* usage_cache);
-
- int64 RecalculateUsage(FileSystemContext* context,
- const GURL& origin,
- FileSystemType type);
SandboxContext* sandbox_context_; // Not owned.
- FileSystemOptions file_system_options_;
bool enable_temporary_file_system_in_incognito_;
- // Acccessed only on the file thread.
- std::set<GURL> visited_origins_;
-
// Observers.
UpdateObserverList update_observers_;
ChangeObserverList change_observers_;

Powered by Google App Engine
This is Rietveld 408576698