| 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 27 matching lines...) Expand all Loading... |
| 38 #include "modules/quota/StorageErrorCallback.h" | 38 #include "modules/quota/StorageErrorCallback.h" |
| 39 #include "modules/quota/StorageQuotaCallback.h" | 39 #include "modules/quota/StorageQuotaCallback.h" |
| 40 #include "modules/quota/StorageUsageCallback.h" | 40 #include "modules/quota/StorageUsageCallback.h" |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 DeprecatedStorageInfo::DeprecatedStorageInfo() | 44 DeprecatedStorageInfo::DeprecatedStorageInfo() |
| 45 { | 45 { |
| 46 } | 46 } |
| 47 | 47 |
| 48 void DeprecatedStorageInfo::queryUsageAndQuota(ExecutionContext* executionContex
t, int storageType, PassOwnPtrWillBeRawPtr<StorageUsageCallback> successCallback
, PassOwnPtrWillBeRawPtr<StorageErrorCallback> errorCallback) | 48 void DeprecatedStorageInfo::queryUsageAndQuota(ExecutionContext* executionContex
t, int storageType, StorageUsageCallback* successCallback, StorageErrorCallback*
errorCallback) |
| 49 { | 49 { |
| 50 // Dispatching the request to DeprecatedStorageQuota, as this interface is d
eprecated in favor of DeprecatedStorageQuota. | 50 // Dispatching the request to DeprecatedStorageQuota, as this interface is d
eprecated in favor of DeprecatedStorageQuota. |
| 51 DeprecatedStorageQuota* storageQuota = getStorageQuota(storageType); | 51 DeprecatedStorageQuota* storageQuota = getStorageQuota(storageType); |
| 52 if (!storageQuota) { | 52 if (!storageQuota) { |
| 53 // Unknown storage type is requested. | 53 // Unknown storage type is requested. |
| 54 executionContext->postTask(StorageErrorCallback::CallbackTask::create(er
rorCallback, NotSupportedError)); | 54 executionContext->postTask(StorageErrorCallback::CallbackTask::create(er
rorCallback, NotSupportedError)); |
| 55 return; | 55 return; |
| 56 } | 56 } |
| 57 storageQuota->queryUsageAndQuota(executionContext, successCallback, errorCal
lback); | 57 storageQuota->queryUsageAndQuota(executionContext, successCallback, errorCal
lback); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void DeprecatedStorageInfo::requestQuota(ExecutionContext* executionContext, int
storageType, unsigned long long newQuotaInBytes, PassOwnPtrWillBeRawPtr<Storage
QuotaCallback> successCallback, PassOwnPtrWillBeRawPtr<StorageErrorCallback> err
orCallback) | 60 void DeprecatedStorageInfo::requestQuota(ExecutionContext* executionContext, int
storageType, unsigned long long newQuotaInBytes, StorageQuotaCallback* successC
allback, StorageErrorCallback* errorCallback) |
| 61 { | 61 { |
| 62 // Dispatching the request to DeprecatedStorageQuota, as this interface is d
eprecated in favor of DeprecatedStorageQuota. | 62 // Dispatching the request to DeprecatedStorageQuota, as this interface is d
eprecated in favor of DeprecatedStorageQuota. |
| 63 DeprecatedStorageQuota* storageQuota = getStorageQuota(storageType); | 63 DeprecatedStorageQuota* storageQuota = getStorageQuota(storageType); |
| 64 if (!storageQuota) { | 64 if (!storageQuota) { |
| 65 // Unknown storage type is requested. | 65 // Unknown storage type is requested. |
| 66 executionContext->postTask(StorageErrorCallback::CallbackTask::create(er
rorCallback, NotSupportedError)); | 66 executionContext->postTask(StorageErrorCallback::CallbackTask::create(er
rorCallback, NotSupportedError)); |
| 67 return; | 67 return; |
| 68 } | 68 } |
| 69 storageQuota->requestQuota(executionContext, newQuotaInBytes, successCallbac
k, errorCallback); | 69 storageQuota->requestQuota(executionContext, newQuotaInBytes, successCallbac
k, errorCallback); |
| 70 } | 70 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 84 return 0; | 84 return 0; |
| 85 } | 85 } |
| 86 | 86 |
| 87 void DeprecatedStorageInfo::trace(Visitor* visitor) | 87 void DeprecatedStorageInfo::trace(Visitor* visitor) |
| 88 { | 88 { |
| 89 visitor->trace(m_temporaryStorage); | 89 visitor->trace(m_temporaryStorage); |
| 90 visitor->trace(m_persistentStorage); | 90 visitor->trace(m_persistentStorage); |
| 91 } | 91 } |
| 92 | 92 |
| 93 } // namespace blink | 93 } // namespace blink |
| OLD | NEW |