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

Unified Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 600393004: [ServiceWorker] Set FetchRequestMode and handle wasFetchedViaServiceWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: delete fetch-cors-xhr-expected.txt Created 6 years, 2 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/core/fetch/ResourceFetcher.h ('k') | Source/core/fetch/ResourceLoader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index d2761cd2cddc17b34eb0117d803247edc33b0d42..a04f9d5b1fa91efdfd3512309e0355dcde98b488 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -615,6 +615,16 @@ bool ResourceFetcher::canAccessResource(Resource* resource, SecurityOrigin* sour
return true;
}
+bool ResourceFetcher::isControlledByServiceWorker()
+{
+ LocalFrame* localFrame = frame();
+ if (!localFrame)
+ return false;
+ if (!m_documentLoader)
+ return false;
+ return localFrame->loader().client()->isControlledByServiceWorker(*m_documentLoader);
+}
+
bool ResourceFetcher::shouldLoadNewResource(Resource::Type type) const
{
if (!frame())
« no previous file with comments | « Source/core/fetch/ResourceFetcher.h ('k') | Source/core/fetch/ResourceLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698