| OLD | NEW |
| 1 // Copyright 2013 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_BROWSER_QUOTA_QUOTA_CALLBACKS_H_ | 5 #ifndef WEBKIT_BROWSER_QUOTA_QUOTA_CALLBACKS_H_ |
| 6 #define WEBKIT_BROWSER_QUOTA_QUOTA_CALLBACKS_H_ | 6 #define WEBKIT_BROWSER_QUOTA_QUOTA_CALLBACKS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 callbacks_.clear(); | 63 callbacks_.clear(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 std::vector<CallbackType> callbacks_; | 67 std::vector<CallbackType> callbacks_; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 typedef CallbackQueue<GlobalUsageCallback, | 70 typedef CallbackQueue<GlobalUsageCallback, |
| 71 Tuple2<int64, int64> > | 71 Tuple2<int64, int64> > |
| 72 GlobalUsageCallbackQueue; | 72 GlobalUsageCallbackQueue; |
| 73 typedef CallbackQueue<UsageCallback, Tuple1<int64> > |
| 74 UsageCallbackQueue; |
| 73 typedef CallbackQueue<AvailableSpaceCallback, | 75 typedef CallbackQueue<AvailableSpaceCallback, |
| 74 Tuple2<QuotaStatusCode, int64> > | 76 Tuple2<QuotaStatusCode, int64> > |
| 75 AvailableSpaceCallbackQueue; | 77 AvailableSpaceCallbackQueue; |
| 76 typedef CallbackQueue<QuotaCallback, | 78 typedef CallbackQueue<QuotaCallback, |
| 77 Tuple2<QuotaStatusCode, int64> > | 79 Tuple2<QuotaStatusCode, int64> > |
| 78 GlobalQuotaCallbackQueue; | 80 GlobalQuotaCallbackQueue; |
| 79 typedef CallbackQueue<base::Closure, Tuple0> ClosureQueue; | 81 typedef CallbackQueue<base::Closure, Tuple0> ClosureQueue; |
| 80 | 82 |
| 81 template <typename CallbackType, typename Key, typename Args> | 83 template <typename CallbackType, typename Key, typename Args> |
| 82 class CallbackQueueMap { | 84 class CallbackQueueMap { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 120 |
| 119 typedef CallbackQueueMap<UsageCallback, std::string, Tuple1<int64> > | 121 typedef CallbackQueueMap<UsageCallback, std::string, Tuple1<int64> > |
| 120 HostUsageCallbackMap; | 122 HostUsageCallbackMap; |
| 121 typedef CallbackQueueMap<QuotaCallback, std::string, | 123 typedef CallbackQueueMap<QuotaCallback, std::string, |
| 122 Tuple2<QuotaStatusCode, int64> > | 124 Tuple2<QuotaStatusCode, int64> > |
| 123 HostQuotaCallbackMap; | 125 HostQuotaCallbackMap; |
| 124 | 126 |
| 125 } // namespace quota | 127 } // namespace quota |
| 126 | 128 |
| 127 #endif // WEBKIT_QUOTA_QUOTA_TYPES_H_ | 129 #endif // WEBKIT_QUOTA_QUOTA_TYPES_H_ |
| OLD | NEW |