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_FILE_SYSTEM_QUOTA_UTIL_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_QUOTA_UTIL_H_ |
6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_QUOTA_UTIL_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_QUOTA_UTIL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
| 13 #include "webkit/browser/webkit_storage_browser_export.h" |
13 #include "webkit/common/fileapi/file_system_types.h" | 14 #include "webkit/common/fileapi/file_system_types.h" |
14 #include "webkit/storage/webkit_storage_export.h" | |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 class SequencedTaskRunner; | 17 class SequencedTaskRunner; |
18 } | 18 } |
19 | 19 |
20 namespace quota { | 20 namespace quota { |
21 class QuotaManagerProxy; | 21 class QuotaManagerProxy; |
22 } | 22 } |
23 | 23 |
24 namespace fileapi { | 24 namespace fileapi { |
25 | 25 |
26 class FileSystemContext; | 26 class FileSystemContext; |
27 | 27 |
28 // An abstract interface that provides common quota-related utility functions | 28 // An abstract interface that provides common quota-related utility functions |
29 // for file_system_quota_client. | 29 // for file_system_quota_client. |
30 // All the methods of this class are synchronous and need to be called on | 30 // All the methods of this class are synchronous and need to be called on |
31 // the thread that the method name implies. | 31 // the thread that the method name implies. |
32 class WEBKIT_STORAGE_EXPORT FileSystemQuotaUtil { | 32 class WEBKIT_STORAGE_BROWSER_EXPORT FileSystemQuotaUtil { |
33 public: | 33 public: |
34 virtual ~FileSystemQuotaUtil() {} | 34 virtual ~FileSystemQuotaUtil() {} |
35 | 35 |
36 virtual void GetOriginsForTypeOnFileThread(fileapi::FileSystemType type, | 36 virtual void GetOriginsForTypeOnFileThread(fileapi::FileSystemType type, |
37 std::set<GURL>* origins) = 0; | 37 std::set<GURL>* origins) = 0; |
38 | 38 |
39 virtual void GetOriginsForHostOnFileThread(fileapi::FileSystemType type, | 39 virtual void GetOriginsForHostOnFileThread(fileapi::FileSystemType type, |
40 const std::string& host, | 40 const std::string& host, |
41 std::set<GURL>* origins) = 0; | 41 std::set<GURL>* origins) = 0; |
42 | 42 |
43 // Returns the amount of data used for the origin for usage tracking. | 43 // Returns the amount of data used for the origin for usage tracking. |
44 virtual int64 GetOriginUsageOnFileThread( | 44 virtual int64 GetOriginUsageOnFileThread( |
45 fileapi::FileSystemContext* file_system_context, | 45 fileapi::FileSystemContext* file_system_context, |
46 const GURL& origin_url, | 46 const GURL& origin_url, |
47 fileapi::FileSystemType type) = 0; | 47 fileapi::FileSystemType type) = 0; |
48 | 48 |
49 virtual void InvalidateUsageCache(const GURL& origin_url, | 49 virtual void InvalidateUsageCache(const GURL& origin_url, |
50 fileapi::FileSystemType type) = 0; | 50 fileapi::FileSystemType type) = 0; |
51 virtual void StickyInvalidateUsageCache(const GURL& origin, | 51 virtual void StickyInvalidateUsageCache(const GURL& origin, |
52 fileapi::FileSystemType type) = 0; | 52 fileapi::FileSystemType type) = 0; |
53 }; | 53 }; |
54 | 54 |
55 } // namespace fileapi | 55 } // namespace fileapi |
56 | 56 |
57 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_QUOTA_UTIL_H_ | 57 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_QUOTA_UTIL_H_ |
OLD | NEW |