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

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

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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/DOMWindowQuota.cpp
diff --git a/Source/modules/quota/DOMWindowQuota.cpp b/Source/modules/quota/DOMWindowQuota.cpp
index 053816047587075d104ca7e2f04aabf70674a7ef..8b7d9c83426ceaf59110f617c43526aa6f7e2eaa 100644
--- a/Source/modules/quota/DOMWindowQuota.cpp
+++ b/Source/modules/quota/DOMWindowQuota.cpp
@@ -39,8 +39,8 @@
namespace WebCore {
-DOMWindowQuota::DOMWindowQuota(DOMWindow* window)
- : DOMWindowProperty(window->frame())
+DOMWindowQuota::DOMWindowQuota(DOMWindow& window)
+ : DOMWindowProperty(window.frame())
{
}
@@ -54,20 +54,20 @@ const char* DOMWindowQuota::supplementName()
}
// static
-DOMWindowQuota* DOMWindowQuota::from(DOMWindow* window)
+DOMWindowQuota& DOMWindowQuota::from(DOMWindow& window)
{
DOMWindowQuota* supplement = static_cast<DOMWindowQuota*>(Supplement<DOMWindow>::from(window, supplementName()));
if (!supplement) {
supplement = new DOMWindowQuota(window);
provideTo(window, supplementName(), adoptPtr(supplement));
}
- return supplement;
+ return *supplement;
}
// static
-DeprecatedStorageInfo* DOMWindowQuota::webkitStorageInfo(DOMWindow* window)
+DeprecatedStorageInfo* DOMWindowQuota::webkitStorageInfo(DOMWindow& window)
{
- return DOMWindowQuota::from(window)->webkitStorageInfo();
+ return DOMWindowQuota::from(window).webkitStorageInfo();
}
DeprecatedStorageInfo* DOMWindowQuota::webkitStorageInfo() const

Powered by Google App Engine
This is Rietveld 408576698