Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1280)

Unified Diff: Source/modules/quota/NavigatorStorageQuota.cpp

Issue 1154573005: Expose Durable Storage API to script (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rename WebSomeCallbacks and SomeCallbacks Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/quota/NavigatorStorageQuota.cpp
diff --git a/Source/modules/quota/NavigatorStorageQuota.cpp b/Source/modules/quota/NavigatorStorageQuota.cpp
index 74263bf03605ac1c73f4c95cea832aa684db6f78..86e7bba644b867903935f9bb99f2e2d9010add16 100644
--- a/Source/modules/quota/NavigatorStorageQuota.cpp
+++ b/Source/modules/quota/NavigatorStorageQuota.cpp
@@ -33,6 +33,7 @@
#include "core/frame/Navigator.h"
#include "modules/quota/DeprecatedStorageQuota.h"
+#include "modules/quota/StorageManager.h"
#include "modules/quota/StorageQuota.h"
namespace blink {
@@ -76,6 +77,11 @@ DeprecatedStorageQuota* NavigatorStorageQuota::webkitPersistentStorage(Navigator
return NavigatorStorageQuota::from(navigator).webkitPersistentStorage();
}
+StorageManager* NavigatorStorageQuota::storage(Navigator& navigator)
+{
+ return NavigatorStorageQuota::from(navigator).storage();
+}
+
StorageQuota* NavigatorStorageQuota::storageQuota() const
{
if (!m_storageQuota && frame())
@@ -97,11 +103,19 @@ DeprecatedStorageQuota* NavigatorStorageQuota::webkitPersistentStorage() const
return m_persistentStorage.get();
}
+StorageManager* NavigatorStorageQuota::storage() const
+{
+ if (!m_storageManager && frame())
+ m_storageManager = new StorageManager();
+ return m_storageManager.get();
+}
+
DEFINE_TRACE(NavigatorStorageQuota)
{
visitor->trace(m_storageQuota);
visitor->trace(m_temporaryStorage);
visitor->trace(m_persistentStorage);
+ visitor->trace(m_storageManager);
HeapSupplement<Navigator>::trace(visitor);
DOMWindowProperty::trace(visitor);
}

Powered by Google App Engine
This is Rietveld 408576698