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

Unified Diff: Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp

Issue 424643002: Introducing the WebServiceWorkerCacheStorage (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: combine with prior CL Created 6 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
Index: Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp b/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
index 8dc28a3cb8b5eff7da029834207451a2c5a9ded8..d3f751d08dad776c8b00a2b84cce87fa4cd814ec 100644
--- a/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
@@ -41,8 +41,8 @@
#include "modules/CachePolyfill.h"
#include "modules/CacheStoragePolyfill.h"
#include "modules/EventTargetModules.h"
-#include "modules/serviceworkers/CacheStorage.h"
#include "modules/serviceworkers/FetchManager.h"
+#include "modules/serviceworkers/FetchStores.h"
#include "modules/serviceworkers/Request.h"
#include "modules/serviceworkers/ServiceWorkerClients.h"
#include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h"
@@ -87,11 +87,11 @@ String ServiceWorkerGlobalScope::scope(ExecutionContext* context)
return ServiceWorkerGlobalScopeClient::from(context)->scope().string();
}
-PassRefPtrWillBeRawPtr<CacheStorage> ServiceWorkerGlobalScope::caches(ExecutionContext* context)
+PassRefPtrWillBeRawPtr<FetchStores> ServiceWorkerGlobalScope::fetchStores(ExecutionContext* context)
{
- if (!m_cacheStorage)
- m_cacheStorage = CacheStorage::create();
- return m_cacheStorage;
+ if (!m_fetchStores)
+ m_fetchStores = FetchStores::create(ServiceWorkerGlobalScopeClient::from(context)->fetchStores());
+ return m_fetchStores;
}
ScriptPromise ServiceWorkerGlobalScope::fetch(ScriptState* scriptState, Request* request)
@@ -173,7 +173,7 @@ const AtomicString& ServiceWorkerGlobalScope::interfaceName() const
void ServiceWorkerGlobalScope::trace(Visitor* visitor)
{
visitor->trace(m_clients);
- visitor->trace(m_cacheStorage);
+ visitor->trace(m_fetchStores);
WorkerGlobalScope::trace(visitor);
}

Powered by Google App Engine
This is Rietveld 408576698