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

Unified Diff: webkit/api/src/StorageNamespaceProxy.cpp

Issue 147248: DOM Storage: Add renderer-process IPC code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
« no previous file with comments | « webkit/api/src/StorageNamespaceProxy.h ('k') | webkit/tools/test_shell/test_shell_webkit_init.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/api/src/StorageNamespaceProxy.cpp
===================================================================
--- webkit/api/src/StorageNamespaceProxy.cpp (revision 21404)
+++ webkit/api/src/StorageNamespaceProxy.cpp (working copy)
@@ -28,20 +28,49 @@
#if ENABLE(DOM_STORAGE)
+#include "SecurityOrigin.h"
+#include "StorageAreaProxy.h"
+#include "WebKit.h"
+#include "WebKitClient.h"
+#include "WebStorageNamespace.h"
+#include "WebString.h"
+
namespace WebCore {
PassRefPtr<StorageNamespace> StorageNamespace::localStorageNamespace(const String& path)
{
- ASSERT_NOT_REACHED();
- return NULL;
+ return new StorageNamespaceProxy(WebKit::webKitClient()->createLocalStorageNamespace(path));
}
PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace()
{
- ASSERT_NOT_REACHED();
- return NULL;
+ return new StorageNamespaceProxy(WebKit::webKitClient()->createSessionStorageNamespace());
}
+StorageNamespaceProxy::StorageNamespaceProxy(WebKit::WebStorageNamespace* storageNamespace)
+ : m_storageNamespace(storageNamespace)
+{
+}
+
+StorageNamespaceProxy::~StorageNamespaceProxy()
+{
+}
+
+PassRefPtr<StorageNamespace> StorageNamespaceProxy::copy()
+{
+ return adoptRef(new StorageNamespaceProxy(m_storageNamespace->copy()));
+}
+
+PassRefPtr<StorageArea> StorageNamespaceProxy::storageArea(SecurityOrigin* origin)
+{
+ return adoptRef(new StorageAreaProxy(m_storageNamespace->createStorageArea(origin->toString())));
+}
+
+void StorageNamespaceProxy::close()
+{
+ m_storageNamespace->close();
+}
+
} // namespace WebCore
#endif // ENABLE(DOM_STORAGE)
« no previous file with comments | « webkit/api/src/StorageNamespaceProxy.h ('k') | webkit/tools/test_shell/test_shell_webkit_init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698