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 <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
13 #include "base/threading/thread_local.h" | 13 #include "base/threading/thread_local.h" |
14 #include "content/child/quota_message_filter.h" | 14 #include "content/child/quota_message_filter.h" |
15 #include "content/child/thread_safe_sender.h" | 15 #include "content/child/thread_safe_sender.h" |
16 #include "content/common/quota_messages.h" | 16 #include "content/common/quota_messages.h" |
17 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" | 17 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" |
18 #include "third_party/WebKit/public/platform/WebStorageQuotaType.h" | 18 #include "third_party/WebKit/public/platform/WebStorageQuotaType.h" |
19 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 19 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
21 | 21 |
22 using blink::WebStorageQuotaCallbacks; | 22 using blink::WebStorageQuotaCallbacks; |
23 using blink::WebStorageQuotaError; | 23 using blink::WebStorageQuotaError; |
24 using blink::WebStorageQuotaType; | 24 using blink::WebStorageQuotaType; |
25 using storage::QuotaStatusCode; | 25 using storage::QuotaStatusCode; |
26 using storage::StorageType; | 26 using storage::StorageType; |
27 | 27 |
28 namespace content { | 28 namespace content { |
29 | 29 |
30 static base::LazyInstance<base::ThreadLocalPointer<QuotaDispatcher> >::Leaky | 30 static base::LazyInstance<base::ThreadLocalPointer<QuotaDispatcher>>::Leaky |
31 g_quota_dispatcher_tls = LAZY_INSTANCE_INITIALIZER; | 31 g_quota_dispatcher_tls = LAZY_INSTANCE_INITIALIZER; |
32 | 32 |
33 namespace { | 33 namespace { |
34 | 34 |
35 // QuotaDispatcher::Callback implementation for WebStorageQuotaCallbacks. | 35 // QuotaDispatcher::Callback implementation for WebStorageQuotaCallbacks. |
36 class WebStorageQuotaDispatcherCallback : public QuotaDispatcher::Callback { | 36 class WebStorageQuotaDispatcherCallback : public QuotaDispatcher::Callback { |
37 public: | 37 public: |
38 explicit WebStorageQuotaDispatcherCallback( | 38 explicit WebStorageQuotaDispatcherCallback( |
39 blink::WebStorageQuotaCallbacks callback) | 39 blink::WebStorageQuotaCallbacks callback) |
40 : callbacks_(callback) {} | 40 : callbacks_(callback) {} |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 "mismatching enums: kStorageTypePersistent"); | 183 "mismatching enums: kStorageTypePersistent"); |
184 | 184 |
185 static_assert(int(blink::WebStorageQuotaErrorNotSupported) == | 185 static_assert(int(blink::WebStorageQuotaErrorNotSupported) == |
186 int(storage::kQuotaErrorNotSupported), | 186 int(storage::kQuotaErrorNotSupported), |
187 "mismatching enums: kQuotaErrorNotSupported"); | 187 "mismatching enums: kQuotaErrorNotSupported"); |
188 static_assert(int(blink::WebStorageQuotaErrorAbort) == | 188 static_assert(int(blink::WebStorageQuotaErrorAbort) == |
189 int(storage::kQuotaErrorAbort), | 189 int(storage::kQuotaErrorAbort), |
190 "mismatching enums: kQuotaErrorAbort"); | 190 "mismatching enums: kQuotaErrorAbort"); |
191 | 191 |
192 } // namespace content | 192 } // namespace content |
OLD | NEW |