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

Unified Diff: third_party/WebKit/Source/platform/exported/WebServiceWorkerRequest.cpp

Issue 1597383002: Service Worker: (Re-commit) Add FetchEvent.clientId (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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
Index: third_party/WebKit/Source/platform/exported/WebServiceWorkerRequest.cpp
diff --git a/third_party/WebKit/Source/platform/exported/WebServiceWorkerRequest.cpp b/third_party/WebKit/Source/platform/exported/WebServiceWorkerRequest.cpp
index bc9c6ed9f323e0fb5786c83b8b532b429b553fd3..95bce10b7f263399e1d4b04ce94996f0e52abbaf 100644
--- a/third_party/WebKit/Source/platform/exported/WebServiceWorkerRequest.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebServiceWorkerRequest.cpp
@@ -7,6 +7,7 @@
#include "platform/blob/BlobData.h"
#include "platform/weborigin/KURL.h"
#include "public/platform/WebHTTPHeaderVisitor.h"
+#include "public/platform/WebString.h"
#include "public/platform/WebURLRequest.h"
namespace blink {
@@ -15,10 +16,12 @@ class WebServiceWorkerRequestPrivate : public RefCounted<WebServiceWorkerRequest
public:
WebServiceWorkerRequestPrivate()
: m_mode(WebURLRequest::FetchRequestModeNoCORS)
+ , m_isMainResourceLoad(false)
, m_credentialsMode(WebURLRequest::FetchCredentialsModeOmit)
, m_redirectMode(WebURLRequest::FetchRedirectModeFollow)
, m_requestContext(WebURLRequest::RequestContextUnspecified)
, m_frameType(WebURLRequest::FrameTypeNone)
+ , m_clientId(WebString())
, m_isReload(false)
{
}
@@ -28,10 +31,12 @@ public:
RefPtr<BlobDataHandle> blobDataHandle;
Referrer m_referrer;
WebURLRequest::FetchRequestMode m_mode;
+ bool m_isMainResourceLoad;
WebURLRequest::FetchCredentialsMode m_credentialsMode;
WebURLRequest::FetchRedirectMode m_redirectMode;
WebURLRequest::RequestContext m_requestContext;
WebURLRequest::FrameType m_frameType;
+ WebString m_clientId;
bool m_isReload;
};
@@ -137,6 +142,16 @@ WebURLRequest::FetchRequestMode WebServiceWorkerRequest::mode() const
return m_private->m_mode;
}
+void WebServiceWorkerRequest::setIsMainResourceLoad(bool isMainResourceLoad)
+{
+ m_private->m_isMainResourceLoad = isMainResourceLoad;
+}
+
+bool WebServiceWorkerRequest::isMainResourceLoad() const
+{
+ return m_private->m_isMainResourceLoad;
+}
+
void WebServiceWorkerRequest::setCredentialsMode(WebURLRequest::FetchCredentialsMode credentialsMode)
{
m_private->m_credentialsMode = credentialsMode;
@@ -177,6 +192,16 @@ WebURLRequest::FrameType WebServiceWorkerRequest::frameType() const
return m_private->m_frameType;
}
+void WebServiceWorkerRequest::setClientId(const WebString& clientId)
+{
+ m_private->m_clientId = clientId;
+}
+
+WebString WebServiceWorkerRequest::clientId() const
+{
+ return m_private->m_clientId;
+}
+
void WebServiceWorkerRequest::setIsReload(bool isReload)
{
m_private->m_isReload = isReload;

Powered by Google App Engine
This is Rietveld 408576698