Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: webkit/quota/quota_types.h

Issue 10958032: Merged HostQuotaCallback into QuotaCallback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« webkit/quota/quota_manager.cc ('K') | « webkit/quota/quota_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
(...skipping 25 matching lines...) Expand all
36 kQuotaStatusUnknown = -1, 36 kQuotaStatusUnknown = -1,
37 }; 37 };
38 38
39 struct UsageInfo; 39 struct UsageInfo;
40 typedef std::vector<UsageInfo> UsageInfoEntries; 40 typedef std::vector<UsageInfo> UsageInfoEntries;
41 41
42 // Common callback types that are used throughout in the quota module. 42 // Common callback types that are used throughout in the quota module.
43 typedef base::Callback<void(StorageType status, 43 typedef base::Callback<void(StorageType status,
44 int64 usage, 44 int64 usage,
45 int64 unlimited_usage)> GlobalUsageCallback; 45 int64 unlimited_usage)> GlobalUsageCallback;
46 typedef base::Callback<void(QuotaStatusCode status, 46 typedef base::Callback<void(QuotaStatusCode status, int64 quota)> QuotaCallback;
47 StorageType type,
48 int64 quota)> QuotaCallback;
49 typedef base::Callback<void(int64 usage)> UsageCallback; 47 typedef base::Callback<void(int64 usage)> UsageCallback;
50 // TODO(calvinlo): Merge HostQuotaCallback and QuotaCallback
51 typedef base::Callback<void(QuotaStatusCode status,
52 int64 quota)> HostQuotaCallback;
53 typedef base::Callback<void(QuotaStatusCode, int64)> AvailableSpaceCallback; 48 typedef base::Callback<void(QuotaStatusCode, int64)> AvailableSpaceCallback;
54 typedef base::Callback<void(QuotaStatusCode)> StatusCallback; 49 typedef base::Callback<void(QuotaStatusCode)> StatusCallback;
55 typedef base::Callback<void(const std::set<GURL>& origins, 50 typedef base::Callback<void(const std::set<GURL>& origins,
56 StorageType type)> GetOriginsCallback; 51 StorageType type)> GetOriginsCallback;
57 typedef base::Callback<void(const UsageInfoEntries&)> GetUsageInfoCallback; 52 typedef base::Callback<void(const UsageInfoEntries&)> GetUsageInfoCallback;
58 53
59 // Simple template wrapper for a callback queue. 54 // Simple template wrapper for a callback queue.
60 template <typename CallbackType> 55 template <typename CallbackType>
61 class CallbackQueueBase { 56 class CallbackQueueBase {
62 public: 57 public:
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 this->callback_map_.erase(key); 192 this->callback_map_.erase(key);
198 } 193 }
199 }; 194 };
200 195
201 typedef CallbackQueueMap1<UsageCallback, std::string, int64> 196 typedef CallbackQueueMap1<UsageCallback, std::string, int64>
202 HostUsageCallbackMap; 197 HostUsageCallbackMap;
203 198
204 } // namespace quota 199 } // namespace quota
205 200
206 #endif // WEBKIT_QUOTA_QUOTA_TYPES_H_ 201 #endif // WEBKIT_QUOTA_QUOTA_TYPES_H_
OLDNEW
« webkit/quota/quota_manager.cc ('K') | « webkit/quota/quota_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698