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

Unified Diff: Source/modules/crypto/DOMWindowCrypto.cpp

Issue 15901021: Move window.crypto to modules/crypto (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix compile error in debug mode Created 7 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
« no previous file with comments | « Source/modules/crypto/DOMWindowCrypto.h ('k') | Source/modules/crypto/DOMWindowCrypto.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/crypto/DOMWindowCrypto.cpp
diff --git a/Source/modules/quota/DOMWindowQuota.cpp b/Source/modules/crypto/DOMWindowCrypto.cpp
similarity index 67%
copy from Source/modules/quota/DOMWindowQuota.cpp
copy to Source/modules/crypto/DOMWindowCrypto.cpp
index c71a279e87ce6d855734c070666c114356c39746..237c298876451ce2a910a4969e8e153aaa23ff93 100644
--- a/Source/modules/quota/DOMWindowQuota.cpp
+++ b/Source/modules/crypto/DOMWindowCrypto.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -29,53 +29,50 @@
*/
#include "config.h"
-#include "modules/quota/DOMWindowQuota.h"
+#include "modules/crypto/DOMWindowCrypto.h"
-#include "core/dom/Document.h"
#include "core/page/DOMWindow.h"
#include "core/page/Frame.h"
-#include "core/page/PageConsole.h"
-#include "modules/quota/StorageInfo.h"
-#include "wtf/PassRefPtr.h"
+#include "modules/crypto/Crypto.h"
namespace WebCore {
-DOMWindowQuota::DOMWindowQuota(DOMWindow* window)
+DOMWindowCrypto::DOMWindowCrypto(DOMWindow* window)
: DOMWindowProperty(window->frame())
{
}
-DOMWindowQuota::~DOMWindowQuota()
+DOMWindowCrypto::~DOMWindowCrypto()
{
}
-const char* DOMWindowQuota::supplementName()
+const char* DOMWindowCrypto::supplementName()
{
- return "DOMWindowQuota";
+ return "DOMWindowCrypto";
}
// static
-DOMWindowQuota* DOMWindowQuota::from(DOMWindow* window)
+DOMWindowCrypto* DOMWindowCrypto::from(DOMWindow* window)
{
- DOMWindowQuota* supplement = static_cast<DOMWindowQuota*>(Supplement<DOMWindow>::from(window, supplementName()));
+ DOMWindowCrypto* supplement = static_cast<DOMWindowCrypto*>(Supplement<DOMWindow>::from(window, supplementName()));
if (!supplement) {
- supplement = new DOMWindowQuota(window);
+ supplement = new DOMWindowCrypto(window);
provideTo(window, supplementName(), adoptPtr(supplement));
}
return supplement;
}
// static
-StorageInfo* DOMWindowQuota::webkitStorageInfo(DOMWindow* window)
+Crypto* DOMWindowCrypto::crypto(DOMWindow* window)
{
- return DOMWindowQuota::from(window)->webkitStorageInfo();
+ return DOMWindowCrypto::from(window)->crypto();
}
-StorageInfo* DOMWindowQuota::webkitStorageInfo() const
+Crypto* DOMWindowCrypto::crypto() const
{
- if (!m_storageInfo && frame())
- m_storageInfo = StorageInfo::create();
- return m_storageInfo.get();
+ if (!m_crypto && frame())
+ m_crypto = Crypto::create();
+ return m_crypto.get();
}
} // namespace WebCore
« no previous file with comments | « Source/modules/crypto/DOMWindowCrypto.h ('k') | Source/modules/crypto/DOMWindowCrypto.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698