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

Unified Diff: third_party/WebKit/Source/platform/network/ResourceResponse.h

Issue 2684933011: M57: Add UseCounter for ServiceWorkerNavigationPreload. (Closed)
Patch Set: Created 3 years, 10 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/network/ResourceResponse.h
diff --git a/third_party/WebKit/Source/platform/network/ResourceResponse.h b/third_party/WebKit/Source/platform/network/ResourceResponse.h
index f985e97898df15541428e9b762c01499e011a260..bb0f21a27e4330d8d2f32babff8629a352219ec5 100644
--- a/third_party/WebKit/Source/platform/network/ResourceResponse.h
+++ b/third_party/WebKit/Source/platform/network/ResourceResponse.h
@@ -338,6 +338,13 @@ class PLATFORM_EXPORT ResourceResponse final {
m_corsExposedHeaderNames = headerNames;
}
+ bool didServiceWorkerNavigationPreload() const {
+ return m_didServiceWorkerNavigationPreload;
+ }
+ void setDidServiceWorkerNavigationPreload(bool value) {
+ m_didServiceWorkerNavigationPreload = value;
+ }
+
int64_t responseTime() const { return m_responseTime; }
void setResponseTime(int64_t responseTime) { m_responseTime = responseTime; }
@@ -482,6 +489,10 @@ class PLATFORM_EXPORT ResourceResponse final {
// to be set if the response was fetched by a ServiceWorker.
Vector<String> m_corsExposedHeaderNames;
+ // True if service worker navigation preload was performed due to
+ // the request for this resource.
+ bool m_didServiceWorkerNavigationPreload;
+
// The time at which the response headers were received. For cached
// responses, this time could be "far" in the past.
int64_t m_responseTime;
@@ -560,6 +571,7 @@ struct CrossThreadResourceResponseData {
WebServiceWorkerResponseType m_serviceWorkerResponseType;
Vector<KURL> m_urlListViaServiceWorker;
String m_cacheStorageCacheName;
+ bool m_didServiceWorkerNavigationPreload;
int64_t m_responseTime;
String m_remoteIPAddress;
unsigned short m_remotePort;

Powered by Google App Engine
This is Rietveld 408576698