From 18141c3237c851520d0e0fa6f02a2e8b31524c7a Mon Sep 17 00:00:00 2001
From: "nhiroki@chromium.org"
 <nhiroki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Thu, 22 Aug 2013 10:33:04 +0000
Subject: FileAPI: Implement FileSystemQuotaUtil on
 SandboxFileSystemBackendDelegate

This makes SandboxFileSystemBackendDelegate to implement FileSystemQuotaUtil
instead of Sandbox/SyncFileSystemBackend so that it can remove a thin layer from
those backends.

And also moves common implementations of FileSystemBackend
(e.g. CreateFileStreamReader()) into the delegate.


BUG=272078
TEST=unit_tests, content_unittests

Review URL: https://chromiumcodereview.appspot.com/22821006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218987 0039d316-1c4b-4281-b951-d872f2087c98
---
 .../browser/fileapi/sandbox_file_system_backend.h  | 44 +---------------------
 1 file changed, 1 insertion(+), 43 deletions(-)

(limited to '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 a1a5686..207600ef 100644
--- a/webkit/browser/fileapi/sandbox_file_system_backend.h
+++ b/webkit/browser/fileapi/sandbox_file_system_backend.h
@@ -27,8 +27,7 @@ namespace fileapi {
 // This interface also lets one enumerate and remove storage for the origins
 // that use the filesystem.
 class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackend
-    : public FileSystemBackend,
-      public FileSystemQuotaUtil {
+    : public FileSystemBackend {
  public:
   explicit SandboxFileSystemBackend(SandboxFileSystemBackendDelegate* delegate);
   virtual ~SandboxFileSystemBackend();
@@ -65,42 +64,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackend
   // This method can only be called on the file thread.
   SandboxFileSystemBackendDelegate::OriginEnumerator* CreateOriginEnumerator();
 
-  // FileSystemQuotaUtil overrides.
-  virtual base::PlatformFileError DeleteOriginDataOnFileThread(
-      FileSystemContext* context,
-      quota::QuotaManagerProxy* proxy,
-      const GURL& origin_url,
-      FileSystemType type) OVERRIDE;
-  virtual void GetOriginsForTypeOnFileThread(
-      FileSystemType type,
-      std::set<GURL>* origins) OVERRIDE;
-  virtual void GetOriginsForHostOnFileThread(
-      FileSystemType type,
-      const std::string& host,
-      std::set<GURL>* origins) OVERRIDE;
-  virtual int64 GetOriginUsageOnFileThread(
-      FileSystemContext* context,
-      const GURL& origin_url,
-      FileSystemType type) OVERRIDE;
-  virtual void AddFileUpdateObserver(
-      FileSystemType type,
-      FileUpdateObserver* observer,
-      base::SequencedTaskRunner* task_runner) OVERRIDE;
-  virtual void AddFileChangeObserver(
-      FileSystemType type,
-      FileChangeObserver* observer,
-      base::SequencedTaskRunner* task_runner) OVERRIDE;
-  virtual void AddFileAccessObserver(
-      FileSystemType type,
-      FileAccessObserver* observer,
-      base::SequencedTaskRunner* task_runner) OVERRIDE;
-  virtual const UpdateObserverList* GetUpdateObservers(
-      FileSystemType type) const OVERRIDE;
-  virtual const ChangeObserverList* GetChangeObservers(
-      FileSystemType type) const OVERRIDE;
-  virtual const AccessObserverList* GetAccessObservers(
-      FileSystemType type) const OVERRIDE;
-
   void set_enable_temporary_file_system_in_incognito(bool enable) {
     enable_temporary_file_system_in_incognito_ = enable;
   }
@@ -110,11 +73,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT SandboxFileSystemBackend
 
   bool enable_temporary_file_system_in_incognito_;
 
-  // Observers.
-  UpdateObserverList update_observers_;
-  ChangeObserverList change_observers_;
-  AccessObserverList access_observers_;
-
   DISALLOW_COPY_AND_ASSIGN(SandboxFileSystemBackend);
 };
 
-- 
cgit v1.1