| 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 19 matching lines...) Expand all Loading... |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 // QuotaDispatcher::Callback implementation for WebStorageQuotaCallbacks. | 32 // QuotaDispatcher::Callback implementation for WebStorageQuotaCallbacks. |
| 33 class WebStorageQuotaDispatcherCallback : public QuotaDispatcher::Callback { | 33 class WebStorageQuotaDispatcherCallback : public QuotaDispatcher::Callback { |
| 34 public: | 34 public: |
| 35 explicit WebStorageQuotaDispatcherCallback( | 35 explicit WebStorageQuotaDispatcherCallback( |
| 36 blink::WebStorageQuotaCallbacks callback) | 36 blink::WebStorageQuotaCallbacks callback) |
| 37 : callbacks_(callback) {} | 37 : callbacks_(callback) {} |
| 38 virtual ~WebStorageQuotaDispatcherCallback() {} | 38 virtual ~WebStorageQuotaDispatcherCallback() {} |
| 39 | 39 |
| 40 virtual void DidQueryStorageUsageAndQuota(int64 usage, int64 quota) OVERRIDE { | 40 virtual void DidQueryStorageUsageAndQuota(int64 usage, int64 quota) override { |
| 41 callbacks_.didQueryStorageUsageAndQuota(usage, quota); | 41 callbacks_.didQueryStorageUsageAndQuota(usage, quota); |
| 42 } | 42 } |
| 43 virtual void DidGrantStorageQuota(int64 usage, int64 granted_quota) OVERRIDE { | 43 virtual void DidGrantStorageQuota(int64 usage, int64 granted_quota) override { |
| 44 callbacks_.didGrantStorageQuota(usage, granted_quota); | 44 callbacks_.didGrantStorageQuota(usage, granted_quota); |
| 45 } | 45 } |
| 46 virtual void DidFail(storage::QuotaStatusCode error) OVERRIDE { | 46 virtual void DidFail(storage::QuotaStatusCode error) override { |
| 47 callbacks_.didFail(static_cast<WebStorageQuotaError>(error)); | 47 callbacks_.didFail(static_cast<WebStorageQuotaError>(error)); |
| 48 } | 48 } |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 blink::WebStorageQuotaCallbacks callbacks_; | 51 blink::WebStorageQuotaCallbacks callbacks_; |
| 52 | 52 |
| 53 DISALLOW_COPY_AND_ASSIGN(WebStorageQuotaDispatcherCallback); | 53 DISALLOW_COPY_AND_ASSIGN(WebStorageQuotaDispatcherCallback); |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 int CurrentWorkerId() { | 56 int CurrentWorkerId() { |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 mismatching_enums); | 183 mismatching_enums); |
| 184 | 184 |
| 185 COMPILE_ASSERT(int(blink::WebStorageQuotaErrorNotSupported) == | 185 COMPILE_ASSERT(int(blink::WebStorageQuotaErrorNotSupported) == |
| 186 int(storage::kQuotaErrorNotSupported), | 186 int(storage::kQuotaErrorNotSupported), |
| 187 mismatching_enums); | 187 mismatching_enums); |
| 188 COMPILE_ASSERT(int(blink::WebStorageQuotaErrorAbort) == | 188 COMPILE_ASSERT(int(blink::WebStorageQuotaErrorAbort) == |
| 189 int(storage::kQuotaErrorAbort), | 189 int(storage::kQuotaErrorAbort), |
| 190 mismatching_enums); | 190 mismatching_enums); |
| 191 | 191 |
| 192 } // namespace content | 192 } // namespace content |
| OLD | NEW |