OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SANDBOX_QUOTA_CLIENT_H_ | 5 #ifndef WEBKIT_FILEAPI_SANDBOX_QUOTA_CLIENT_H_ |
6 #define WEBKIT_FILEAPI_SANDBOX_QUOTA_CLIENT_H_ | 6 #define WEBKIT_FILEAPI_SANDBOX_QUOTA_CLIENT_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 28 matching lines...) Expand all Loading... |
39 virtual void OnQuotaManagerDestroyed() OVERRIDE; | 39 virtual void OnQuotaManagerDestroyed() OVERRIDE; |
40 virtual void GetOriginUsage(const GURL& origin_url, | 40 virtual void GetOriginUsage(const GURL& origin_url, |
41 quota::StorageType type, | 41 quota::StorageType type, |
42 GetUsageCallback* callback) OVERRIDE; | 42 GetUsageCallback* callback) OVERRIDE; |
43 virtual void GetOriginsForType(quota::StorageType type, | 43 virtual void GetOriginsForType(quota::StorageType type, |
44 GetOriginsCallback* callback) OVERRIDE; | 44 GetOriginsCallback* callback) OVERRIDE; |
45 virtual void GetOriginsForHost(quota::StorageType type, | 45 virtual void GetOriginsForHost(quota::StorageType type, |
46 const std::string& host, | 46 const std::string& host, |
47 GetOriginsCallback* callback) OVERRIDE; | 47 GetOriginsCallback* callback) OVERRIDE; |
48 | 48 |
| 49 virtual void DeleteOriginData(const GURL& origin, |
| 50 quota::StorageType type, |
| 51 DeletionCallback* callback) OVERRIDE; |
| 52 |
49 private: | 53 private: |
50 class GetOriginUsageTask; | 54 class GetOriginUsageTask; |
51 class GetOriginsTaskBase; | 55 class GetOriginsTaskBase; |
52 class GetOriginsForTypeTask; | 56 class GetOriginsForTypeTask; |
53 class GetOriginsForHostTask; | 57 class GetOriginsForHostTask; |
| 58 class DeleteOriginTask; |
54 | 59 |
55 typedef std::pair<fileapi::FileSystemType, std::string> TypeAndHostOrOrigin; | 60 typedef std::pair<fileapi::FileSystemType, std::string> TypeAndHostOrOrigin; |
56 typedef quota::CallbackQueueMap1<GetUsageCallback*, | 61 typedef quota::CallbackQueueMap1<GetUsageCallback*, |
57 TypeAndHostOrOrigin, | 62 TypeAndHostOrOrigin, |
58 int64 | 63 int64 |
59 > UsageCallbackMap; | 64 > UsageCallbackMap; |
60 typedef quota::CallbackQueueMap1<GetOriginsCallback*, | 65 typedef quota::CallbackQueueMap1<GetOriginsCallback*, |
61 fileapi::FileSystemType, | 66 fileapi::FileSystemType, |
62 const std::set<GURL>& | 67 const std::set<GURL>& |
63 > OriginsForTypeCallbackMap; | 68 > OriginsForTypeCallbackMap; |
(...skipping 20 matching lines...) Expand all Loading... |
84 UsageCallbackMap pending_usage_callbacks_; | 89 UsageCallbackMap pending_usage_callbacks_; |
85 OriginsForTypeCallbackMap pending_origins_for_type_callbacks_; | 90 OriginsForTypeCallbackMap pending_origins_for_type_callbacks_; |
86 OriginsForHostCallbackMap pending_origins_for_host_callbacks_; | 91 OriginsForHostCallbackMap pending_origins_for_host_callbacks_; |
87 | 92 |
88 DISALLOW_COPY_AND_ASSIGN(SandboxQuotaClient); | 93 DISALLOW_COPY_AND_ASSIGN(SandboxQuotaClient); |
89 }; | 94 }; |
90 | 95 |
91 } // namespace fileapi | 96 } // namespace fileapi |
92 | 97 |
93 #endif // WEBKIT_FILEAPI_SANDBOX_QUOTA_CLIENT_H_ | 98 #endif // WEBKIT_FILEAPI_SANDBOX_QUOTA_CLIENT_H_ |
OLD | NEW |