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 #include "content/child/quota_dispatcher.h" | 5 #include "content/child/quota_dispatcher.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/threading/thread_local.h" | 9 #include "base/threading/thread_local.h" |
10 #include "content/child/child_thread.h" | 10 #include "content/child/child_thread.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 168 |
169 void QuotaDispatcher::DidFail( | 169 void QuotaDispatcher::DidFail( |
170 int request_id, | 170 int request_id, |
171 QuotaStatusCode error) { | 171 QuotaStatusCode error) { |
172 Callback* callback = pending_quota_callbacks_.Lookup(request_id); | 172 Callback* callback = pending_quota_callbacks_.Lookup(request_id); |
173 DCHECK(callback); | 173 DCHECK(callback); |
174 callback->DidFail(error); | 174 callback->DidFail(error); |
175 pending_quota_callbacks_.Remove(request_id); | 175 pending_quota_callbacks_.Remove(request_id); |
176 } | 176 } |
177 | 177 |
178 COMPILE_ASSERT(int(blink::WebStorageQuotaTypeTemporary) == | 178 static_assert(int(blink::WebStorageQuotaTypeTemporary) == |
179 int(storage::kStorageTypeTemporary), | 179 int(storage::kStorageTypeTemporary), |
180 mismatching_enums); | 180 "mismatching enums: kStorageTypeTemporary"); |
181 COMPILE_ASSERT(int(blink::WebStorageQuotaTypePersistent) == | 181 static_assert(int(blink::WebStorageQuotaTypePersistent) == |
182 int(storage::kStorageTypePersistent), | 182 int(storage::kStorageTypePersistent), |
183 mismatching_enums); | 183 "mismatching enums: kStorageTypePersistent"); |
184 | 184 |
185 COMPILE_ASSERT(int(blink::WebStorageQuotaErrorNotSupported) == | 185 static_assert(int(blink::WebStorageQuotaErrorNotSupported) == |
186 int(storage::kQuotaErrorNotSupported), | 186 int(storage::kQuotaErrorNotSupported), |
187 mismatching_enums); | 187 "mismatching enums: kQuotaErrorNotSupported"); |
188 COMPILE_ASSERT(int(blink::WebStorageQuotaErrorAbort) == | 188 static_assert(int(blink::WebStorageQuotaErrorAbort) == |
189 int(storage::kQuotaErrorAbort), | 189 int(storage::kQuotaErrorAbort), |
190 mismatching_enums); | 190 "mismatching enums: kQuotaErrorAbort"); |
191 | 191 |
192 } // namespace content | 192 } // namespace content |
OLD | NEW |