OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 28 matching lines...) Expand all Loading... |
39 #include "modules/quota/StorageUsageCallback.h" | 39 #include "modules/quota/StorageUsageCallback.h" |
40 #include "platform/StorageQuotaCallbacks.h" | 40 #include "platform/StorageQuotaCallbacks.h" |
41 #include "platform/weborigin/KURL.h" | 41 #include "platform/weborigin/KURL.h" |
42 #include "platform/weborigin/SecurityOrigin.h" | 42 #include "platform/weborigin/SecurityOrigin.h" |
43 #include "public/platform/Platform.h" | 43 #include "public/platform/Platform.h" |
44 #include "public/platform/WebStorageQuotaCallbacks.h" | 44 #include "public/platform/WebStorageQuotaCallbacks.h" |
45 #include "public/platform/WebStorageQuotaType.h" | 45 #include "public/platform/WebStorageQuotaType.h" |
46 | 46 |
47 namespace WebCore { | 47 namespace WebCore { |
48 | 48 |
| 49 DEFINE_GC_INFO(DeprecatedStorageQuota); |
| 50 |
49 DeprecatedStorageQuota::DeprecatedStorageQuota(Type type) | 51 DeprecatedStorageQuota::DeprecatedStorageQuota(Type type) |
50 : m_type(type) | 52 : m_type(type) |
51 { | 53 { |
52 ScriptWrappable::init(this); | 54 ScriptWrappable::init(this); |
53 } | 55 } |
54 | 56 |
55 void DeprecatedStorageQuota::queryUsageAndQuota(ExecutionContext* executionConte
xt, PassOwnPtr<StorageUsageCallback> successCallback, PassOwnPtr<StorageErrorCal
lback> errorCallback) | 57 void DeprecatedStorageQuota::queryUsageAndQuota(ExecutionContext* executionConte
xt, PassOwnPtr<StorageUsageCallback> successCallback, PassOwnPtr<StorageErrorCal
lback> errorCallback) |
56 { | 58 { |
57 ASSERT(executionContext); | 59 ASSERT(executionContext); |
58 | 60 |
(...skipping 22 matching lines...) Expand all Loading... |
81 blink::WebStorageQuotaType storageType = static_cast<blink::WebStorageQuotaT
ype>(m_type); | 83 blink::WebStorageQuotaType storageType = static_cast<blink::WebStorageQuotaT
ype>(m_type); |
82 if (storageType != blink::WebStorageQuotaTypeTemporary && storageType != bli
nk::WebStorageQuotaTypePersistent) { | 84 if (storageType != blink::WebStorageQuotaTypeTemporary && storageType != bli
nk::WebStorageQuotaTypePersistent) { |
83 // Unknown storage type is requested. | 85 // Unknown storage type is requested. |
84 executionContext->postTask(StorageErrorCallback::CallbackTask::create(er
rorCallback, NotSupportedError)); | 86 executionContext->postTask(StorageErrorCallback::CallbackTask::create(er
rorCallback, NotSupportedError)); |
85 return; | 87 return; |
86 } | 88 } |
87 | 89 |
88 StorageQuotaClient::from(executionContext)->requestQuota(executionContext, s
torageType, newQuotaInBytes, successCallback, errorCallback); | 90 StorageQuotaClient::from(executionContext)->requestQuota(executionContext, s
torageType, newQuotaInBytes, successCallback, errorCallback); |
89 } | 91 } |
90 | 92 |
91 DeprecatedStorageQuota::~DeprecatedStorageQuota() | |
92 { | |
93 } | |
94 | |
95 } // namespace WebCore | 93 } // namespace WebCore |
OLD | NEW |