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

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/ForeignFetchEvent.cpp

Issue 1969403004: Expose and check origin of request in response for foreign fetch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@set-request-and-credentials-mode
Patch Set: update layouttests Created 4 years, 7 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: third_party/WebKit/Source/modules/serviceworkers/ForeignFetchEvent.cpp
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchEvent.cpp b/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchEvent.cpp
index e2a1814ab2cdacf7b4028f244972def1b578bddb..2843673ae53bcc4f9441c0d2e4efba4814b5abf6 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchEvent.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchEvent.cpp
@@ -30,6 +30,11 @@ Request* ForeignFetchEvent::request() const
return m_request;
}
+String ForeignFetchEvent::origin() const
+{
+ return m_origin;
+}
+
void ForeignFetchEvent::respondWith(ScriptState* scriptState, ScriptPromise scriptPromise, ExceptionState& exceptionState)
{
stopImmediatePropagation();
@@ -52,6 +57,8 @@ ForeignFetchEvent::ForeignFetchEvent(const AtomicString& type, const ForeignFetc
{
if (initializer.hasRequest())
m_request = initializer.request();
+ if (initializer.hasOrigin())
+ m_origin = initializer.origin();
}
DEFINE_TRACE(ForeignFetchEvent)

Powered by Google App Engine
This is Rietveld 408576698