| 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" |
| 11 #include "content/child/quota_message_filter.h" | 11 #include "content/child/quota_message_filter.h" |
| 12 #include "content/child/thread_safe_sender.h" | 12 #include "content/child/thread_safe_sender.h" |
| 13 #include "content/common/quota_messages.h" | 13 #include "content/common/quota_messages.h" |
| 14 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" | 14 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" |
| 15 #include "third_party/WebKit/public/platform/WebStorageQuotaType.h" | 15 #include "third_party/WebKit/public/platform/WebStorageQuotaType.h" |
| 16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 17 | 17 |
| 18 using quota::QuotaStatusCode; | |
| 19 using quota::StorageType; | |
| 20 | |
| 21 using blink::WebStorageQuotaCallbacks; | 18 using blink::WebStorageQuotaCallbacks; |
| 22 using blink::WebStorageQuotaError; | 19 using blink::WebStorageQuotaError; |
| 23 using blink::WebStorageQuotaType; | 20 using blink::WebStorageQuotaType; |
| 24 | 21 using quota::QuotaStatusCode; |
| 25 using webkit_glue::WorkerTaskRunner; | 22 using quota::StorageType; |
| 26 | 23 |
| 27 namespace content { | 24 namespace content { |
| 28 | 25 |
| 29 static base::LazyInstance<base::ThreadLocalPointer<QuotaDispatcher> >::Leaky | 26 static base::LazyInstance<base::ThreadLocalPointer<QuotaDispatcher> >::Leaky |
| 30 g_quota_dispatcher_tls = LAZY_INSTANCE_INITIALIZER; | 27 g_quota_dispatcher_tls = LAZY_INSTANCE_INITIALIZER; |
| 31 | 28 |
| 32 namespace { | 29 namespace { |
| 33 | 30 |
| 34 // QuotaDispatcher::Callback implementation for WebStorageQuotaCallbacks. | 31 // QuotaDispatcher::Callback implementation for WebStorageQuotaCallbacks. |
| 35 class WebStorageQuotaDispatcherCallback : public QuotaDispatcher::Callback { | 32 class WebStorageQuotaDispatcherCallback : public QuotaDispatcher::Callback { |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 int(quota::kStorageTypeTemporary), mismatching_enums); | 170 int(quota::kStorageTypeTemporary), mismatching_enums); |
| 174 COMPILE_ASSERT(int(blink::WebStorageQuotaTypePersistent) == \ | 171 COMPILE_ASSERT(int(blink::WebStorageQuotaTypePersistent) == \ |
| 175 int(quota::kStorageTypePersistent), mismatching_enums); | 172 int(quota::kStorageTypePersistent), mismatching_enums); |
| 176 | 173 |
| 177 COMPILE_ASSERT(int(blink::WebStorageQuotaErrorNotSupported) == \ | 174 COMPILE_ASSERT(int(blink::WebStorageQuotaErrorNotSupported) == \ |
| 178 int(quota::kQuotaErrorNotSupported), mismatching_enums); | 175 int(quota::kQuotaErrorNotSupported), mismatching_enums); |
| 179 COMPILE_ASSERT(int(blink::WebStorageQuotaErrorAbort) == \ | 176 COMPILE_ASSERT(int(blink::WebStorageQuotaErrorAbort) == \ |
| 180 int(quota::kQuotaErrorAbort), mismatching_enums); | 177 int(quota::kQuotaErrorAbort), mismatching_enums); |
| 181 | 178 |
| 182 } // namespace content | 179 } // namespace content |
| OLD | NEW |