| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <map> | 10 #include <map> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/callback_old.h" | 14 #include "base/callback_old.h" |
| 15 #include "base/stl_util-inl.h" | 15 #include "base/stl_util-inl.h" |
| 16 | 16 |
| 17 class GURL; |
| 18 |
| 17 namespace quota { | 19 namespace quota { |
| 18 | 20 |
| 19 enum StorageType { | 21 enum StorageType { |
| 20 kStorageTypeTemporary, | 22 kStorageTypeTemporary, |
| 21 kStorageTypePersistent, | 23 kStorageTypePersistent, |
| 22 kStorageTypeUnknown, | 24 kStorageTypeUnknown, |
| 23 }; | 25 }; |
| 24 | 26 |
| 25 // TODO(tzik): Add assertions to | 27 // TODO(tzik): Add assertions to |
| 26 // content/browser/renderer_host/quota_dispatcher_host.cc | 28 // content/browser/renderer_host/quota_dispatcher_host.cc |
| (...skipping 15 matching lines...) Expand all Loading... |
| 42 int64>::Type QuotaCallback; | 44 int64>::Type QuotaCallback; |
| 43 typedef Callback3<const std::string& /* host */, | 45 typedef Callback3<const std::string& /* host */, |
| 44 StorageType, | 46 StorageType, |
| 45 int64>::Type HostUsageCallback; | 47 int64>::Type HostUsageCallback; |
| 46 typedef Callback4<QuotaStatusCode, | 48 typedef Callback4<QuotaStatusCode, |
| 47 const std::string& /* host */, | 49 const std::string& /* host */, |
| 48 StorageType, | 50 StorageType, |
| 49 int64>::Type HostQuotaCallback; | 51 int64>::Type HostQuotaCallback; |
| 50 typedef Callback2<QuotaStatusCode, | 52 typedef Callback2<QuotaStatusCode, |
| 51 int64>::Type AvailableSpaceCallback; | 53 int64>::Type AvailableSpaceCallback; |
| 54 typedef Callback1<const std::set<GURL>&>::Type GetOriginsCallback; |
| 52 | 55 |
| 53 // Simple template wrapper for a callback queue. | 56 // Simple template wrapper for a callback queue. |
| 54 template <typename CallbackType> | 57 template <typename CallbackType> |
| 55 class CallbackQueueBase { | 58 class CallbackQueueBase { |
| 56 public: | 59 public: |
| 57 typedef typename std::deque<CallbackType> Queue; | 60 typedef typename std::deque<CallbackType> Queue; |
| 58 typedef typename Queue::iterator iterator; | 61 typedef typename Queue::iterator iterator; |
| 59 | 62 |
| 60 virtual ~CallbackQueueBase() { | 63 virtual ~CallbackQueueBase() { |
| 61 STLDeleteContainerPointers(callbacks_.begin(), callbacks_.end()); | 64 STLDeleteContainerPointers(callbacks_.begin(), callbacks_.end()); |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 const std::string&, | 271 const std::string&, |
| 269 StorageType, int64> HostUsageCallbackMap; | 272 StorageType, int64> HostUsageCallbackMap; |
| 270 typedef CallbackQueueMap4<HostQuotaCallback*, std::string, | 273 typedef CallbackQueueMap4<HostQuotaCallback*, std::string, |
| 271 QuotaStatusCode, | 274 QuotaStatusCode, |
| 272 const std::string&, | 275 const std::string&, |
| 273 StorageType, int64> HostQuotaCallbackMap; | 276 StorageType, int64> HostQuotaCallbackMap; |
| 274 | 277 |
| 275 } // namespace quota | 278 } // namespace quota |
| 276 | 279 |
| 277 #endif // WEBKIT_QUOTA_QUOTA_TYPES_H_ | 280 #endif // WEBKIT_QUOTA_QUOTA_TYPES_H_ |
| OLD | NEW |