This source file includes following definitions.
- m_errorCallback
- m_errorCallback
- didQueryStorageUsageAndQuota
- didGrantStorageQuota
- didFail
#include "config.h"
#include "modules/quota/DeprecatedStorageQuotaCallbacksImpl.h"
#include "core/dom/DOMError.h"
#include "core/dom/ExceptionCode.h"
namespace WebCore {
DeprecatedStorageQuotaCallbacksImpl::DeprecatedStorageQuotaCallbacksImpl(PassOwnPtr<StorageUsageCallback> usageCallback, PassOwnPtr<StorageErrorCallback> errorCallback)
: m_usageCallback(usageCallback)
, m_errorCallback(errorCallback)
{
}
DeprecatedStorageQuotaCallbacksImpl::DeprecatedStorageQuotaCallbacksImpl(PassOwnPtr<StorageQuotaCallback> quotaCallback, PassOwnPtr<StorageErrorCallback> errorCallback)
: m_quotaCallback(quotaCallback)
, m_errorCallback(errorCallback)
{
}
DeprecatedStorageQuotaCallbacksImpl::~DeprecatedStorageQuotaCallbacksImpl()
{
}
void DeprecatedStorageQuotaCallbacksImpl::didQueryStorageUsageAndQuota(unsigned long long usageInBytes, unsigned long long quotaInBytes)
{
if (m_usageCallback)
m_usageCallback->handleEvent(usageInBytes, quotaInBytes);
}
void DeprecatedStorageQuotaCallbacksImpl::didGrantStorageQuota(unsigned long long usageInBytes, unsigned long long grantedQuotaInBytes)
{
if (m_quotaCallback)
m_quotaCallback->handleEvent(grantedQuotaInBytes);
}
void DeprecatedStorageQuotaCallbacksImpl::didFail(blink::WebStorageQuotaError error)
{
if (m_errorCallback)
m_errorCallback->handleEvent(DOMError::create(static_cast<ExceptionCode>(error)).get());
}
}