OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_QUOTA_QUOTA_TYPES_H_ | 5 #ifndef WEBKIT_QUOTA_QUOTA_CALLBACKS_H_ |
6 #define WEBKIT_QUOTA_QUOTA_TYPES_H_ | 6 #define WEBKIT_QUOTA_QUOTA_CALLBACKS_H_ |
7 | 7 |
8 #include <deque> | |
9 #include <map> | 8 #include <map> |
10 #include <set> | 9 #include <set> |
11 #include <string> | 10 #include <string> |
12 #include <vector> | 11 #include <vector> |
13 | 12 |
14 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
15 #include "base/callback.h" | 14 #include "base/callback.h" |
16 #include "base/tuple.h" | 15 #include "base/tuple.h" |
17 #include "webkit/quota/quota_status_code.h" | 16 #include "webkit/quota/quota_status_code.h" |
| 17 #include "webkit/quota/quota_types.h" |
18 | 18 |
19 class GURL; | 19 class GURL; |
20 | 20 |
21 namespace quota { | 21 namespace quota { |
22 | 22 |
23 enum StorageType { | |
24 kStorageTypeTemporary, | |
25 kStorageTypePersistent, | |
26 kStorageTypeSyncable, | |
27 kStorageTypeUnknown, | |
28 }; | |
29 | |
30 enum QuotaLimitType { | |
31 kQuotaLimitTypeUnknown, | |
32 kQuotaLimitTypeLimited, | |
33 kQuotaLimitTypeUnlimited, | |
34 }; | |
35 | |
36 struct UsageInfo; | 23 struct UsageInfo; |
37 typedef std::vector<UsageInfo> UsageInfoEntries; | 24 typedef std::vector<UsageInfo> UsageInfoEntries; |
38 | 25 |
39 // Common callback types that are used throughout in the quota module. | 26 // Common callback types that are used throughout in the quota module. |
40 typedef base::Callback<void(int64 usage, | 27 typedef base::Callback<void(int64 usage, |
41 int64 unlimited_usage)> GlobalUsageCallback; | 28 int64 unlimited_usage)> GlobalUsageCallback; |
42 typedef base::Callback<void(QuotaStatusCode status, int64 quota)> QuotaCallback; | 29 typedef base::Callback<void(QuotaStatusCode status, int64 quota)> QuotaCallback; |
43 typedef base::Callback<void(int64 usage)> UsageCallback; | 30 typedef base::Callback<void(int64 usage)> UsageCallback; |
44 typedef base::Callback<void(QuotaStatusCode, int64)> AvailableSpaceCallback; | 31 typedef base::Callback<void(QuotaStatusCode, int64)> AvailableSpaceCallback; |
45 typedef base::Callback<void(QuotaStatusCode)> StatusCallback; | 32 typedef base::Callback<void(QuotaStatusCode)> StatusCallback; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 118 |
132 typedef CallbackQueueMap<UsageCallback, std::string, Tuple1<int64> > | 119 typedef CallbackQueueMap<UsageCallback, std::string, Tuple1<int64> > |
133 HostUsageCallbackMap; | 120 HostUsageCallbackMap; |
134 typedef CallbackQueueMap<QuotaCallback, std::string, | 121 typedef CallbackQueueMap<QuotaCallback, std::string, |
135 Tuple2<QuotaStatusCode, int64> > | 122 Tuple2<QuotaStatusCode, int64> > |
136 HostQuotaCallbackMap; | 123 HostQuotaCallbackMap; |
137 | 124 |
138 } // namespace quota | 125 } // namespace quota |
139 | 126 |
140 #endif // WEBKIT_QUOTA_QUOTA_TYPES_H_ | 127 #endif // WEBKIT_QUOTA_QUOTA_TYPES_H_ |
OLD | NEW |