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

Unified Diff: net/url_request/url_request.h

Issue 375513002: [ServiceWorker] Propagates ServiceWorker fetched response's URL and wasFetchedViaServiceWorker flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comment 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
« net/http/http_response_info.cc ('K') | « net/http/http_response_info.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.h
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 0357c6ae803236d3f8f44be6cf03843cadd882cd..4f3cc85bb11dd2efc607580f882b3d21ba07489f 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -499,6 +499,17 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
return response_info_.ssl_info;
}
+ // Returns true if the URLRequest was delivered through a ServiceWorker.
+ bool was_fetched_via_service_worker() const {
+ return response_info_.was_fetched_via_service_worker;
+ }
+
+ // The original URL of the repsponse which was fetched via the ServiceWorker.
tyoshino (SeeGerritForStatus) 2014/07/09 06:35:25 response
horo 2014/07/09 11:14:03 Done.
+ // This may be empty if the repsponse was created inside the ServiceWorker.
tyoshino (SeeGerritForStatus) 2014/07/09 06:35:25 response
horo 2014/07/09 11:14:03 Done.
+ const GURL& original_url_via_service_worker() const {
+ return response_info_.original_url_via_service_worker;
+ }
+
// Gets timing information related to the request. Events that have not yet
// occurred are left uninitialized. After a second request starts, due to
// a redirect or authentication, values will be reset.
« net/http/http_response_info.cc ('K') | « net/http/http_response_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698