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 25 matching lines...) Expand all Loading... |
36 #include "core/dom/ExecutionContext.h" | 36 #include "core/dom/ExecutionContext.h" |
37 #include "modules/quota/DeprecatedStorageQuota.h" | 37 #include "modules/quota/DeprecatedStorageQuota.h" |
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 ScriptWrappable::init(this); | |
47 } | 46 } |
48 | 47 |
49 void DeprecatedStorageInfo::queryUsageAndQuota(ExecutionContext* executionContex
t, int storageType, PassOwnPtrWillBeRawPtr<StorageUsageCallback> successCallback
, PassOwnPtrWillBeRawPtr<StorageErrorCallback> errorCallback) | 48 void DeprecatedStorageInfo::queryUsageAndQuota(ExecutionContext* executionContex
t, int storageType, PassOwnPtrWillBeRawPtr<StorageUsageCallback> successCallback
, PassOwnPtrWillBeRawPtr<StorageErrorCallback> errorCallback) |
50 { | 49 { |
51 // 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. |
52 DeprecatedStorageQuota* storageQuota = getStorageQuota(storageType); | 51 DeprecatedStorageQuota* storageQuota = getStorageQuota(storageType); |
53 if (!storageQuota) { | 52 if (!storageQuota) { |
54 // Unknown storage type is requested. | 53 // Unknown storage type is requested. |
55 executionContext->postTask(StorageErrorCallback::CallbackTask::create(er
rorCallback, NotSupportedError)); | 54 executionContext->postTask(StorageErrorCallback::CallbackTask::create(er
rorCallback, NotSupportedError)); |
56 return; | 55 return; |
(...skipping 28 matching lines...) Expand all Loading... |
85 return 0; | 84 return 0; |
86 } | 85 } |
87 | 86 |
88 void DeprecatedStorageInfo::trace(Visitor* visitor) | 87 void DeprecatedStorageInfo::trace(Visitor* visitor) |
89 { | 88 { |
90 visitor->trace(m_temporaryStorage); | 89 visitor->trace(m_temporaryStorage); |
91 visitor->trace(m_persistentStorage); | 90 visitor->trace(m_persistentStorage); |
92 } | 91 } |
93 | 92 |
94 } // namespace blink | 93 } // namespace blink |
OLD | NEW |