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

Unified Diff: Source/modules/quota/WorkerNavigatorStorageQuota.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/WorkerNavigatorStorageQuota.cpp
diff --git a/Source/modules/quota/WorkerNavigatorStorageQuota.cpp b/Source/modules/quota/WorkerNavigatorStorageQuota.cpp
index b2928d8604df084340924352c6491e39bef8035e..f2e0a2892f6f8a652fc45f8e0782c1e291df9d54 100644
--- a/Source/modules/quota/WorkerNavigatorStorageQuota.cpp
+++ b/Source/modules/quota/WorkerNavigatorStorageQuota.cpp
@@ -48,24 +48,24 @@ const char* WorkerNavigatorStorageQuota::supplementName()
return "WorkerNavigatorStorageQuota";
}
-WorkerNavigatorStorageQuota* WorkerNavigatorStorageQuota::from(WorkerNavigator* navigator)
+WorkerNavigatorStorageQuota& WorkerNavigatorStorageQuota::from(WorkerNavigator& navigator)
{
WorkerNavigatorStorageQuota* supplement = static_cast<WorkerNavigatorStorageQuota*>(Supplement<WorkerNavigator>::from(navigator, supplementName()));
if (!supplement) {
supplement = new WorkerNavigatorStorageQuota();
provideTo(navigator, supplementName(), adoptPtr(supplement));
}
- return supplement;
+ return *supplement;
}
-DeprecatedStorageQuota* WorkerNavigatorStorageQuota::webkitTemporaryStorage(WorkerNavigator* navigator)
+DeprecatedStorageQuota* WorkerNavigatorStorageQuota::webkitTemporaryStorage(WorkerNavigator& navigator)
{
- return WorkerNavigatorStorageQuota::from(navigator)->webkitTemporaryStorage();
+ return WorkerNavigatorStorageQuota::from(navigator).webkitTemporaryStorage();
}
-DeprecatedStorageQuota* WorkerNavigatorStorageQuota::webkitPersistentStorage(WorkerNavigator* navigator)
+DeprecatedStorageQuota* WorkerNavigatorStorageQuota::webkitPersistentStorage(WorkerNavigator& navigator)
{
- return WorkerNavigatorStorageQuota::from(navigator)->webkitPersistentStorage();
+ return WorkerNavigatorStorageQuota::from(navigator).webkitPersistentStorage();
}
DeprecatedStorageQuota* WorkerNavigatorStorageQuota::webkitTemporaryStorage() const

Powered by Google App Engine
This is Rietveld 408576698