| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/common/web_quota_dispatcher_callback.h" |
| 6 |
| 7 #include "base/basictypes.h" |
| 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaCallba
cks.h" |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaType.h
" |
| 10 |
| 11 using quota::QuotaStatusCode; |
| 12 using WebKit::WebStorageQuotaCallbacks; |
| 13 using WebKit::WebStorageQuotaError; |
| 14 using WebKit::WebStorageQuotaType; |
| 15 |
| 16 WebQuotaDispatcherCallback::WebQuotaDispatcherCallback( |
| 17 WebStorageQuotaCallbacks* callbacks) |
| 18 : callbacks_(callbacks) { |
| 19 DCHECK(callbacks_); |
| 20 } |
| 21 |
| 22 WebQuotaDispatcherCallback::~WebQuotaDispatcherCallback() { |
| 23 } |
| 24 |
| 25 void WebQuotaDispatcherCallback::DidQueryStorageUsageAndQuota( |
| 26 int64 usage, int64 quota) { |
| 27 callbacks_->didQueryStorageUsageAndQuota(usage, quota); |
| 28 } |
| 29 |
| 30 void WebQuotaDispatcherCallback::DidGrantStorageQuota(int64 granted_quota){ |
| 31 callbacks_->didGrantStorageQuota(granted_quota); |
| 32 } |
| 33 |
| 34 void WebQuotaDispatcherCallback::DidFail(QuotaStatusCode error) { |
| 35 callbacks_->didFail(static_cast<WebStorageQuotaError>(error)); |
| 36 } |
| 37 |
| 38 COMPILE_ASSERT(int(WebKit::WebStorageQuotaTypeTemporary) == \ |
| 39 int(quota::kStorageTypeTemporary), mismatching_enums); |
| 40 COMPILE_ASSERT(int(WebKit::WebStorageQuotaTypePersistent) == \ |
| 41 int(quota::kStorageTypePersistent), mismatching_enums); |
| 42 |
| 43 COMPILE_ASSERT(int(WebKit::WebStorageQuotaErrorNotSupported) == \ |
| 44 int(quota::kQuotaErrorNotSupported), mismatching_enums); |
| 45 COMPILE_ASSERT(int(WebKit::WebStorageQuotaErrorAbort) == \ |
| 46 int(quota::kQuotaErrorAbort), mismatching_enums); |
| OLD | NEW |