void StorageInfo::requestQuota(ScriptExecutionContext* scriptExecutionContext, int storageType, unsigned long long newQuotaInBytes, PassRefPtr<StorageQuotaCallback> successCallback, PassRefPtr<StorageErrorCallback> errorCallback)
{
    // Dispatching the request to StorageQuota, as this interface is deprecated in favor of StorageQuota.
    StorageQuota* storageQuota = getStorageQuota(storageType);
    if (!storageQuota) {
        // Unknown storage type is requested.
        scriptExecutionContext->postTask(StorageErrorCallback::CallbackTask::create(errorCallback, NOT_SUPPORTED_ERR));
        return;
    }
    storageQuota->requestQuota(scriptExecutionContext, newQuotaInBytes, successCallback, errorCallback);
}
void DeprecatedStorageInfo::requestQuota(ExecutionContext* executionContext, int storageType, unsigned long long newQuotaInBytes, StorageQuotaCallback* successCallback, StorageErrorCallback* errorCallback)
{
    // Dispatching the request to DeprecatedStorageQuota, as this interface is deprecated in favor of DeprecatedStorageQuota.
    DeprecatedStorageQuota* storageQuota = getStorageQuota(storageType);
    if (!storageQuota) {
        // Unknown storage type is requested.
        executionContext->postTask(BLINK_FROM_HERE, StorageErrorCallback::CallbackTask::create(errorCallback, NotSupportedError));
        return;
    }
    storageQuota->requestQuota(executionContext, newQuotaInBytes, successCallback, errorCallback);
}
예제 #3
0
void DeprecatedStorageInfo::queryUsageAndQuota(ExecutionContext* executionContext, int storageType, StorageUsageCallback* successCallback, StorageErrorCallback* errorCallback)
{
    // Dispatching the request to DeprecatedStorageQuota, as this interface is deprecated in favor of DeprecatedStorageQuota.
    DeprecatedStorageQuota* storageQuota = getStorageQuota(storageType);
    if (!storageQuota) {
        // Unknown storage type is requested.
        executionContext->postTask(StorageErrorCallback::CallbackTask::create(errorCallback, NotSupportedError));
        return;
    }
    storageQuota->queryUsageAndQuota(executionContext, successCallback, errorCallback);
}