| 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_FILEAPI_FILE_SYSTEM_QUOTA_UTIL_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_QUOTA_UTIL_H_ |
| 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_QUOTA_UTIL_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_QUOTA_UTIL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 friend class base::RefCountedThreadSafe<Proxy>; | 47 friend class base::RefCountedThreadSafe<Proxy>; |
| 48 Proxy(FileSystemQuotaUtil* quota_handler, | 48 Proxy(FileSystemQuotaUtil* quota_handler, |
| 49 base::SequencedTaskRunner* file_task_runner); | 49 base::SequencedTaskRunner* file_task_runner); |
| 50 ~Proxy(); | 50 ~Proxy(); |
| 51 | 51 |
| 52 FileSystemQuotaUtil* quota_util_; // Accessed only on the FILE thread. | 52 FileSystemQuotaUtil* quota_util_; // Accessed only on the FILE thread. |
| 53 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; | 53 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; |
| 54 DISALLOW_COPY_AND_ASSIGN(Proxy); | 54 DISALLOW_COPY_AND_ASSIGN(Proxy); |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 virtual ~FileSystemQuotaUtil(); |
| 58 |
| 57 // Called by quota client. | 59 // Called by quota client. |
| 58 virtual void GetOriginsForTypeOnFileThread(fileapi::FileSystemType type, | 60 virtual void GetOriginsForTypeOnFileThread(fileapi::FileSystemType type, |
| 59 std::set<GURL>* origins) = 0; | 61 std::set<GURL>* origins) = 0; |
| 60 | 62 |
| 61 // Called by quota client. | 63 // Called by quota client. |
| 62 virtual void GetOriginsForHostOnFileThread(fileapi::FileSystemType type, | 64 virtual void GetOriginsForHostOnFileThread(fileapi::FileSystemType type, |
| 63 const std::string& host, | 65 const std::string& host, |
| 64 std::set<GURL>* origins) = 0; | 66 std::set<GURL>* origins) = 0; |
| 65 | 67 |
| 66 // Called by quota client. | 68 // Called by quota client. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 91 virtual void EndUpdateOriginOnFileThread(const GURL& origin_url, | 93 virtual void EndUpdateOriginOnFileThread(const GURL& origin_url, |
| 92 fileapi::FileSystemType type) = 0; | 94 fileapi::FileSystemType type) = 0; |
| 93 | 95 |
| 94 virtual void InvalidateUsageCache(const GURL& origin_url, | 96 virtual void InvalidateUsageCache(const GURL& origin_url, |
| 95 fileapi::FileSystemType type) = 0; | 97 fileapi::FileSystemType type) = 0; |
| 96 | 98 |
| 97 Proxy* proxy() { return proxy_.get(); } | 99 Proxy* proxy() { return proxy_.get(); } |
| 98 | 100 |
| 99 protected: | 101 protected: |
| 100 explicit FileSystemQuotaUtil(base::SequencedTaskRunner* file_task_runner); | 102 explicit FileSystemQuotaUtil(base::SequencedTaskRunner* file_task_runner); |
| 101 virtual ~FileSystemQuotaUtil(); | |
| 102 | 103 |
| 103 private: | 104 private: |
| 104 scoped_refptr<Proxy> proxy_; | 105 scoped_refptr<Proxy> proxy_; |
| 105 }; | 106 }; |
| 106 | 107 |
| 107 } // namespace fileapi | 108 } // namespace fileapi |
| 108 | 109 |
| 109 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_QUOTA_UTIL_H_ | 110 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_QUOTA_UTIL_H_ |
| OLD | NEW |