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

Side by Side 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, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ 5 #ifndef CONTENT_CHILD_REQUEST_EXTRA_DATA_H_
6 #define CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ 6 #define CONTENT_CHILD_REQUEST_EXTRA_DATA_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 stream_override_ = std::move(stream_override); 126 stream_override_ = std::move(stream_override);
127 } 127 }
128 128
129 bool initiated_in_secure_context() const { 129 bool initiated_in_secure_context() const {
130 return initiated_in_secure_context_; 130 return initiated_in_secure_context_;
131 } 131 }
132 void set_initiated_in_secure_context(bool secure) { 132 void set_initiated_in_secure_context(bool secure) {
133 initiated_in_secure_context_ = secure; 133 initiated_in_secure_context_ = secure;
134 } 134 }
135 135
136 // The request is a prefetch and should use LOAD_PREFETCH network flags.
137 bool is_prefetch() const { return is_prefetch_; }
138 void set_is_prefetch(bool prefetch) { is_prefetch_ = prefetch; }
139
140 // The request is downloaded to the network cache, but not rendered or
141 // executed. The renderer will see this as an aborted request.
142 bool download_to_network_cache_only() const {
143 return download_to_network_cache_only_;
144 }
145 void set_download_to_network_cache_only(bool download_to_cache) {
146 download_to_network_cache_only_ = download_to_cache;
147 }
148
136 private: 149 private:
137 blink::WebPageVisibilityState visibility_state_; 150 blink::WebPageVisibilityState visibility_state_;
138 int render_frame_id_; 151 int render_frame_id_;
139 bool is_main_frame_; 152 bool is_main_frame_;
140 GURL frame_origin_; 153 GURL frame_origin_;
141 bool parent_is_main_frame_; 154 bool parent_is_main_frame_;
142 int parent_render_frame_id_; 155 int parent_render_frame_id_;
143 bool allow_download_; 156 bool allow_download_;
144 ui::PageTransition transition_type_; 157 ui::PageTransition transition_type_;
145 bool should_replace_current_entry_; 158 bool should_replace_current_entry_;
146 int transferred_request_child_id_; 159 int transferred_request_child_id_;
147 int transferred_request_request_id_; 160 int transferred_request_request_id_;
148 int service_worker_provider_id_; 161 int service_worker_provider_id_;
149 bool originated_from_service_worker_; 162 bool originated_from_service_worker_;
150 blink::WebString custom_user_agent_; 163 blink::WebString custom_user_agent_;
151 blink::WebString requested_with_; 164 blink::WebString requested_with_;
152 std::unique_ptr<StreamOverrideParameters> stream_override_; 165 std::unique_ptr<StreamOverrideParameters> stream_override_;
153 bool initiated_in_secure_context_; 166 bool initiated_in_secure_context_;
167 bool is_prefetch_;
168 bool download_to_network_cache_only_;
154 169
155 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); 170 DISALLOW_COPY_AND_ASSIGN(RequestExtraData);
156 }; 171 };
157 172
158 } // namespace content 173 } // namespace content
159 174
160 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ 175 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698