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/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 ScriptWrappable::init(this); | 46 ScriptWrappable::init(this); |
47 } | 47 } |
48 | 48 |
49 DeprecatedStorageInfo::~DeprecatedStorageInfo() | |
50 { | |
51 } | |
52 | |
53 void DeprecatedStorageInfo::queryUsageAndQuota(ExecutionContext* executionContex
t, int storageType, PassOwnPtr<StorageUsageCallback> successCallback, PassOwnPtr
<StorageErrorCallback> errorCallback) | 49 void DeprecatedStorageInfo::queryUsageAndQuota(ExecutionContext* executionContex
t, int storageType, PassOwnPtr<StorageUsageCallback> successCallback, PassOwnPtr
<StorageErrorCallback> errorCallback) |
54 { | 50 { |
55 // Dispatching the request to DeprecatedStorageQuota, as this interface is d
eprecated in favor of DeprecatedStorageQuota. | 51 // Dispatching the request to DeprecatedStorageQuota, as this interface is d
eprecated in favor of DeprecatedStorageQuota. |
56 DeprecatedStorageQuota* storageQuota = getStorageQuota(storageType); | 52 DeprecatedStorageQuota* storageQuota = getStorageQuota(storageType); |
57 if (!storageQuota) { | 53 if (!storageQuota) { |
58 // Unknown storage type is requested. | 54 // Unknown storage type is requested. |
59 executionContext->postTask(StorageErrorCallback::CallbackTask::create(er
rorCallback, NotSupportedError)); | 55 executionContext->postTask(StorageErrorCallback::CallbackTask::create(er
rorCallback, NotSupportedError)); |
60 return; | 56 return; |
61 } | 57 } |
62 storageQuota->queryUsageAndQuota(executionContext, successCallback, errorCal
lback); | 58 storageQuota->queryUsageAndQuota(executionContext, successCallback, errorCal
lback); |
(...skipping 26 matching lines...) Expand all Loading... |
89 return 0; | 85 return 0; |
90 } | 86 } |
91 | 87 |
92 void DeprecatedStorageInfo::trace(Visitor* visitor) | 88 void DeprecatedStorageInfo::trace(Visitor* visitor) |
93 { | 89 { |
94 visitor->trace(m_temporaryStorage); | 90 visitor->trace(m_temporaryStorage); |
95 visitor->trace(m_persistentStorage); | 91 visitor->trace(m_persistentStorage); |
96 } | 92 } |
97 | 93 |
98 } // namespace blink | 94 } // namespace blink |
OLD | NEW |