| 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_QUOTA_QUOTA_TYPES_H_ | 5 #ifndef WEBKIT_QUOTA_QUOTA_TYPES_H_ |
| 6 #define WEBKIT_QUOTA_QUOTA_TYPES_H_ | 6 #define WEBKIT_QUOTA_QUOTA_TYPES_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/callback.h" | 15 #include "base/callback.h" |
| 16 #include "webkit/quota/quota_status_code.h" | 16 #include "webkit/quota/quota_status_code.h" |
| 17 | 17 |
| 18 class GURL; | 18 class GURL; |
| 19 | 19 |
| 20 namespace quota { | 20 namespace quota { |
| 21 | 21 |
| 22 enum StorageType { | 22 enum StorageType { |
| 23 kStorageTypeTemporary, | 23 kStorageTypeTemporary, |
| 24 kStorageTypePersistent, | 24 kStorageTypePersistent, |
| 25 kStorageTypeSyncable, | 25 kStorageTypeSyncable, |
| 26 kStorageTypeUnknown, | 26 kStorageTypeUnknown, |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 enum QuotaLimitType { |
| 30 kQuotaLimitTypeUnknown, |
| 31 kQuotaLimitTypeLimited, |
| 32 kQuotaLimitTypeUnlimited, |
| 33 }; |
| 34 |
| 29 struct UsageInfo; | 35 struct UsageInfo; |
| 30 typedef std::vector<UsageInfo> UsageInfoEntries; | 36 typedef std::vector<UsageInfo> UsageInfoEntries; |
| 31 | 37 |
| 32 // Common callback types that are used throughout in the quota module. | 38 // Common callback types that are used throughout in the quota module. |
| 33 typedef base::Callback<void(StorageType status, | 39 typedef base::Callback<void(StorageType status, |
| 34 int64 usage, | 40 int64 usage, |
| 35 int64 unlimited_usage)> GlobalUsageCallback; | 41 int64 unlimited_usage)> GlobalUsageCallback; |
| 36 typedef base::Callback<void(QuotaStatusCode status, int64 quota)> QuotaCallback; | 42 typedef base::Callback<void(QuotaStatusCode status, int64 quota)> QuotaCallback; |
| 37 typedef base::Callback<void(int64 usage)> UsageCallback; | 43 typedef base::Callback<void(int64 usage)> UsageCallback; |
| 38 typedef base::Callback<void(QuotaStatusCode, int64)> AvailableSpaceCallback; | 44 typedef base::Callback<void(QuotaStatusCode, int64)> AvailableSpaceCallback; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 this->callback_map_.erase(key); | 165 this->callback_map_.erase(key); |
| 160 } | 166 } |
| 161 }; | 167 }; |
| 162 | 168 |
| 163 typedef CallbackQueueMap1<UsageCallback, std::string, int64> | 169 typedef CallbackQueueMap1<UsageCallback, std::string, int64> |
| 164 HostUsageCallbackMap; | 170 HostUsageCallbackMap; |
| 165 | 171 |
| 166 } // namespace quota | 172 } // namespace quota |
| 167 | 173 |
| 168 #endif // WEBKIT_QUOTA_QUOTA_TYPES_H_ | 174 #endif // WEBKIT_QUOTA_QUOTA_TYPES_H_ |
| OLD | NEW |