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

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

Issue 2617583005: Remove ContextClient from NavigatorStorageQuota
Patch Set: temp Created 3 years, 11 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 | « third_party/WebKit/Source/modules/quota/NavigatorStorageQuota.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/quota/NavigatorStorageQuota.cpp
diff --git a/third_party/WebKit/Source/modules/quota/NavigatorStorageQuota.cpp b/third_party/WebKit/Source/modules/quota/NavigatorStorageQuota.cpp
index 77f5b5a46875ddd467ec0621bb12b6a1c818e7d7..4c7021355416db88c9025e2eb9c43d9469250f82 100644
--- a/third_party/WebKit/Source/modules/quota/NavigatorStorageQuota.cpp
+++ b/third_party/WebKit/Source/modules/quota/NavigatorStorageQuota.cpp
@@ -37,8 +37,8 @@
namespace blink {
-NavigatorStorageQuota::NavigatorStorageQuota(LocalFrame* frame)
- : ContextClient(frame) {}
+NavigatorStorageQuota::NavigatorStorageQuota(Navigator& navigator)
+ : Supplement<Navigator>(navigator) {}
const char* NavigatorStorageQuota::supplementName() {
return "NavigatorStorageQuota";
@@ -48,7 +48,7 @@ NavigatorStorageQuota& NavigatorStorageQuota::from(Navigator& navigator) {
NavigatorStorageQuota* supplement = static_cast<NavigatorStorageQuota*>(
Supplement<Navigator>::from(navigator, supplementName()));
if (!supplement) {
- supplement = new NavigatorStorageQuota(navigator.frame());
+ supplement = new NavigatorStorageQuota(navigator);
provideTo(navigator, supplementName(), supplement);
}
return *supplement;
@@ -73,27 +73,27 @@ StorageManager* NavigatorStorageQuota::storage(Navigator& navigator) {
}
StorageQuota* NavigatorStorageQuota::storageQuota() const {
- if (!m_storageQuota && frame())
+ if (!m_storageQuota)
m_storageQuota = StorageQuota::create();
return m_storageQuota.get();
}
DeprecatedStorageQuota* NavigatorStorageQuota::webkitTemporaryStorage() const {
- if (!m_temporaryStorage && frame())
+ if (!m_temporaryStorage)
m_temporaryStorage =
DeprecatedStorageQuota::create(DeprecatedStorageQuota::Temporary);
return m_temporaryStorage.get();
}
DeprecatedStorageQuota* NavigatorStorageQuota::webkitPersistentStorage() const {
- if (!m_persistentStorage && frame())
+ if (!m_persistentStorage)
m_persistentStorage =
DeprecatedStorageQuota::create(DeprecatedStorageQuota::Persistent);
return m_persistentStorage.get();
}
StorageManager* NavigatorStorageQuota::storage() const {
- if (!m_storageManager && frame())
+ if (!m_storageManager)
m_storageManager = new StorageManager();
return m_storageManager.get();
}
@@ -104,7 +104,6 @@ DEFINE_TRACE(NavigatorStorageQuota) {
visitor->trace(m_persistentStorage);
visitor->trace(m_storageManager);
Supplement<Navigator>::trace(visitor);
- ContextClient::trace(visitor);
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/modules/quota/NavigatorStorageQuota.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698