Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: content/common/web_quota_dispatcher_callback.cc

Issue 7438001: Cleanup: Make quota dispatcher code independent from WebKit types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698