| 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 namespace quota { | 17 namespace quota { |
| 18 | 18 |
| 19 enum StorageType { | 19 enum StorageType { |
| 20 kStorageTypeTemporary, | 20 kStorageTypeTemporary, |
| 21 kStorageTypePersistent, | 21 kStorageTypePersistent, |
| 22 kStorageTypeUnknown, | 22 kStorageTypeUnknown, |
| 23 }; | 23 }; |
| 24 | 24 |
| 25 // TODO(tzik): Add assertions to |
| 26 // content/browser/renderer_host/quota_dispatcher_host.cc |
| 27 // ref) third_party/WebKit/Source/WebCore/dom/ExceptionCode.h, |
| 25 enum QuotaStatusCode { | 28 enum QuotaStatusCode { |
| 26 kQuotaStatusOk = 0, | 29 kQuotaStatusOk = 0, |
| 27 kQuotaErrorNotSupported = 9, | 30 kQuotaErrorNotSupported = 9, // NOT_SUPPORTED_ERR |
| 28 kQuotaErrorAbort = 20, | 31 kQuotaErrorInvalidModification = 13, // INVALID_MODIFICATION_ERR |
| 32 kQuotaErrorInvalidAccess = 15, // INVALID_ACCESS_ERR |
| 33 kQuotaErrorAbort = 20, // ABORT_ERR |
| 29 kQuotaStatusUnknown = -1, | 34 kQuotaStatusUnknown = -1, |
| 30 }; | 35 }; |
| 31 | 36 |
| 32 // Common callback types that are used throughout in the quota module. | 37 // Common callback types that are used throughout in the quota module. |
| 33 typedef Callback1<int64>::Type UsageCallback; | 38 typedef Callback1<int64>::Type UsageCallback; |
| 34 typedef Callback1<int64>::Type QuotaCallback; | 39 typedef Callback1<int64>::Type QuotaCallback; |
| 35 typedef Callback2<const std::string& /* host */, | 40 typedef Callback2<const std::string& /* host */, |
| 36 int64>::Type HostUsageCallback; | 41 int64>::Type HostUsageCallback; |
| 37 typedef Callback2<const std::string& /* host */, | 42 typedef Callback2<const std::string& /* host */, |
| 38 int64>::Type HostQuotaCallback; | 43 int64>::Type HostQuotaCallback; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 }; | 171 }; |
| 167 | 172 |
| 168 typedef CallbackQueueMap2<HostUsageCallback*, std::string, | 173 typedef CallbackQueueMap2<HostUsageCallback*, std::string, |
| 169 const std::string&, int64> HostUsageCallbackMap; | 174 const std::string&, int64> HostUsageCallbackMap; |
| 170 typedef CallbackQueueMap2<HostUsageCallback*, std::string, | 175 typedef CallbackQueueMap2<HostUsageCallback*, std::string, |
| 171 const std::string&, int64> HostQuotaCallbackMap; | 176 const std::string&, int64> HostQuotaCallbackMap; |
| 172 | 177 |
| 173 } // namespace quota | 178 } // namespace quota |
| 174 | 179 |
| 175 #endif // WEBKIT_QUOTA_QUOTA_TYPES_H_ | 180 #endif // WEBKIT_QUOTA_QUOTA_TYPES_H_ |
| OLD | NEW |