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

Unified Diff: content/child/request_extra_data.h

Issue 2262183002: [NoStatePrefetch] Do not send responses to renderer in prefetch mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefetchProto
Patch Set: Cleanup Created 4 years, 4 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: content/child/request_extra_data.h
diff --git a/content/child/request_extra_data.h b/content/child/request_extra_data.h
index 77c164655d90cc967c20db1d5c24e34fb6eeadc6..d7583d17e23b2bc2152c93be313892b23d52a8b4 100644
--- a/content/child/request_extra_data.h
+++ b/content/child/request_extra_data.h
@@ -133,6 +133,19 @@ class CONTENT_EXPORT RequestExtraData
initiated_in_secure_context_ = secure;
}
+ // The request is a prefetch and should use LOAD_PREFETCH network flags.
+ bool is_prefetch() const { return is_prefetch_; }
+ void set_is_prefetch(bool prefetch) { is_prefetch_ = prefetch; }
+
+ // The request is downloaded to the network cache, but not rendered or
+ // executed. The renderer will see this as an aborted request.
+ bool download_to_network_cache_only() const {
+ return download_to_network_cache_only_;
+ }
+ void set_download_to_network_cache_only(bool download_to_cache) {
+ download_to_network_cache_only_ = download_to_cache;
+ }
+
private:
blink::WebPageVisibilityState visibility_state_;
int render_frame_id_;
@@ -151,6 +164,8 @@ class CONTENT_EXPORT RequestExtraData
blink::WebString requested_with_;
std::unique_ptr<StreamOverrideParameters> stream_override_;
bool initiated_in_secure_context_;
+ bool is_prefetch_;
+ bool download_to_network_cache_only_;
DISALLOW_COPY_AND_ASSIGN(RequestExtraData);
};

Powered by Google App Engine
This is Rietveld 408576698