| 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 26 matching lines...) Expand all Loading... |
| 37 #include "core/dom/ScriptExecutionContext.h" | 37 #include "core/dom/ScriptExecutionContext.h" |
| 38 #include "modules/quota/StorageErrorCallback.h" | 38 #include "modules/quota/StorageErrorCallback.h" |
| 39 #include "modules/quota/StorageQuota.h" | 39 #include "modules/quota/StorageQuota.h" |
| 40 #include "modules/quota/StorageQuotaCallback.h" | 40 #include "modules/quota/StorageQuotaCallback.h" |
| 41 #include "modules/quota/StorageUsageCallback.h" | 41 #include "modules/quota/StorageUsageCallback.h" |
| 42 | 42 |
| 43 namespace WebCore { | 43 namespace WebCore { |
| 44 | 44 |
| 45 StorageInfo::StorageInfo() | 45 StorageInfo::StorageInfo() |
| 46 { | 46 { |
| 47 ScriptWrappable::init(this); |
| 47 } | 48 } |
| 48 | 49 |
| 49 StorageInfo::~StorageInfo() | 50 StorageInfo::~StorageInfo() |
| 50 { | 51 { |
| 51 } | 52 } |
| 52 | 53 |
| 53 void StorageInfo::queryUsageAndQuota(ScriptExecutionContext* scriptExecutionCont
ext, int storageType, PassRefPtr<StorageUsageCallback> successCallback, PassRefP
tr<StorageErrorCallback> errorCallback) | 54 void StorageInfo::queryUsageAndQuota(ScriptExecutionContext* scriptExecutionCont
ext, int storageType, PassRefPtr<StorageUsageCallback> successCallback, PassRefP
tr<StorageErrorCallback> errorCallback) |
| 54 { | 55 { |
| 55 // Dispatching the request to StorageQuota, as this interface is deprecated
in favor of StorageQuota. | 56 // Dispatching the request to StorageQuota, as this interface is deprecated
in favor of StorageQuota. |
| 56 StorageQuota* storageQuota = getStorageQuota(storageType); | 57 StorageQuota* storageQuota = getStorageQuota(storageType); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 83 return m_temporaryStorage.get(); | 84 return m_temporaryStorage.get(); |
| 84 case PERSISTENT: | 85 case PERSISTENT: |
| 85 if (!m_persistentStorage) | 86 if (!m_persistentStorage) |
| 86 m_persistentStorage = StorageQuota::create(StorageQuota::Persistent)
; | 87 m_persistentStorage = StorageQuota::create(StorageQuota::Persistent)
; |
| 87 return m_persistentStorage.get(); | 88 return m_persistentStorage.get(); |
| 88 } | 89 } |
| 89 return 0; | 90 return 0; |
| 90 } | 91 } |
| 91 | 92 |
| 92 } // namespace WebCore | 93 } // namespace WebCore |
| OLD | NEW |