| OLD | NEW | 
|    1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
|    2 // Use of this source code is governed by a BSD-style license that can be |    2 // Use of this source code is governed by a BSD-style license that can be | 
|    3 // found in the LICENSE file. |    3 // found in the LICENSE file. | 
|    4  |    4  | 
|    5 #ifndef WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_SYSTEM_BACKEND_H_ |    5 #ifndef WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_SYSTEM_BACKEND_H_ | 
|    6 #define WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_SYSTEM_BACKEND_H_ |    6 #define WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_SYSTEM_BACKEND_H_ | 
|    7  |    7  | 
|    8 #include <set> |    8 #include <set> | 
|    9 #include <string> |    9 #include <string> | 
|   10 #include <vector> |   10 #include <vector> | 
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  123       FileSystemType type, |  123       FileSystemType type, | 
|  124       std::set<GURL>* origins) OVERRIDE; |  124       std::set<GURL>* origins) OVERRIDE; | 
|  125   virtual void GetOriginsForHostOnFileThread( |  125   virtual void GetOriginsForHostOnFileThread( | 
|  126       FileSystemType type, |  126       FileSystemType type, | 
|  127       const std::string& host, |  127       const std::string& host, | 
|  128       std::set<GURL>* origins) OVERRIDE; |  128       std::set<GURL>* origins) OVERRIDE; | 
|  129   virtual int64 GetOriginUsageOnFileThread( |  129   virtual int64 GetOriginUsageOnFileThread( | 
|  130       FileSystemContext* context, |  130       FileSystemContext* context, | 
|  131       const GURL& origin_url, |  131       const GURL& origin_url, | 
|  132       FileSystemType type) OVERRIDE; |  132       FileSystemType type) OVERRIDE; | 
|  133  |  133   virtual void InvalidateUsageCache( | 
|  134   virtual void InvalidateUsageCache(const GURL& origin_url, |  134       const GURL& origin_url, | 
|  135                                     FileSystemType type) OVERRIDE; |  135       FileSystemType type) OVERRIDE; | 
|  136   virtual void StickyInvalidateUsageCache(const GURL& origin_url, |  136   virtual void StickyInvalidateUsageCache( | 
|  137                                           FileSystemType type) OVERRIDE; |  137       const GURL& origin_url, | 
 |  138       FileSystemType type) OVERRIDE; | 
 |  139   virtual void AddFileUpdateObserver( | 
 |  140       FileSystemType type, | 
 |  141       FileUpdateObserver* observer, | 
 |  142       base::SequencedTaskRunner* task_runner) OVERRIDE; | 
 |  143   virtual void AddFileChangeObserver( | 
 |  144       FileSystemType type, | 
 |  145       FileChangeObserver* observer, | 
 |  146       base::SequencedTaskRunner* task_runner) OVERRIDE; | 
 |  147   virtual void AddFileAccessObserver( | 
 |  148       FileSystemType type, | 
 |  149       FileAccessObserver* observer, | 
 |  150       base::SequencedTaskRunner* task_runner) OVERRIDE; | 
 |  151   virtual const UpdateObserverList* GetUpdateObservers( | 
 |  152       FileSystemType type) const OVERRIDE; | 
 |  153   virtual const ChangeObserverList* GetChangeObservers( | 
 |  154       FileSystemType type) const OVERRIDE; | 
 |  155   virtual const AccessObserverList* GetAccessObservers( | 
 |  156       FileSystemType type) const OVERRIDE; | 
|  138  |  157  | 
|  139   void CollectOpenFileSystemMetrics(base::PlatformFileError error_code); |  158   void CollectOpenFileSystemMetrics(base::PlatformFileError error_code); | 
|  140  |  159  | 
|  141   // Returns observers for the given type. |  | 
|  142   const UpdateObserverList* GetUpdateObservers(FileSystemType type) const; |  | 
|  143   const AccessObserverList* GetAccessObservers(FileSystemType type) const; |  | 
|  144  |  | 
|  145   void AddFileUpdateObserver(FileSystemType type, |  | 
|  146                              FileUpdateObserver* observer, |  | 
|  147                              base::SequencedTaskRunner* task_runner); |  | 
|  148   void AddFileChangeObserver(FileSystemType type, |  | 
|  149                              FileChangeObserver* observer, |  | 
|  150                              base::SequencedTaskRunner* task_runner); |  | 
|  151  |  | 
|  152   // Performs API-specific validity checks on the given path |url|. |  160   // Performs API-specific validity checks on the given path |url|. | 
|  153   // Returns true if access to |url| is valid in this filesystem. |  161   // Returns true if access to |url| is valid in this filesystem. | 
|  154   bool IsAccessValid(const FileSystemURL& url) const; |  162   bool IsAccessValid(const FileSystemURL& url) const; | 
|  155  |  163  | 
|  156   void set_enable_temporary_file_system_in_incognito(bool enable) { |  164   void set_enable_temporary_file_system_in_incognito(bool enable) { | 
|  157     enable_temporary_file_system_in_incognito_ = enable; |  165     enable_temporary_file_system_in_incognito_ = enable; | 
|  158   } |  166   } | 
|  159  |  167  | 
|  160  private: |  168  private: | 
|  161   friend class SandboxQuotaObserver; |  169   friend class SandboxQuotaObserver; | 
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  219   bool enable_usage_tracking_; |  227   bool enable_usage_tracking_; | 
|  220  |  228  | 
|  221   base::WeakPtrFactory<SandboxFileSystemBackend> weak_factory_; |  229   base::WeakPtrFactory<SandboxFileSystemBackend> weak_factory_; | 
|  222  |  230  | 
|  223   DISALLOW_COPY_AND_ASSIGN(SandboxFileSystemBackend); |  231   DISALLOW_COPY_AND_ASSIGN(SandboxFileSystemBackend); | 
|  224 }; |  232 }; | 
|  225  |  233  | 
|  226 }  // namespace fileapi |  234 }  // namespace fileapi | 
|  227  |  235  | 
|  228 #endif  // WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_SYSTEM_BACKEND_H_ |  236 #endif  // WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_SYSTEM_BACKEND_H_ | 
| OLD | NEW |