OLD | NEW |
---|---|
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_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/supports_user_data.h" | 15 #include "base/supports_user_data.h" |
16 #include "content/public/browser/resource_request_info.h" | 16 #include "content/public/browser/resource_request_info.h" |
17 #include "content/public/common/referrer.h" | 17 #include "content/public/common/referrer.h" |
18 #include "content/public/common/resource_type.h" | 18 #include "content/public/common/resource_type.h" |
19 #include "mojo/public/cpp/system/data_pipe.h" | |
19 #include "net/base/load_states.h" | 20 #include "net/base/load_states.h" |
20 | 21 |
21 namespace content { | 22 namespace content { |
22 class CrossSiteResourceHandler; | 23 class CrossSiteResourceHandler; |
23 class DetachableResourceHandler; | 24 class DetachableResourceHandler; |
24 class ResourceContext; | 25 class ResourceContext; |
25 class ResourceMessageFilter; | 26 class ResourceMessageFilter; |
26 struct GlobalRequestID; | 27 struct GlobalRequestID; |
27 struct GlobalRoutingID; | 28 struct GlobalRoutingID; |
28 | 29 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
177 bool is_load_timing_enabled() const { return enable_load_timing_; } | 178 bool is_load_timing_enabled() const { return enable_load_timing_; } |
178 | 179 |
179 bool is_upload_progress_enabled() const { return enable_upload_progress_; } | 180 bool is_upload_progress_enabled() const { return enable_upload_progress_; } |
180 | 181 |
181 bool do_not_prompt_for_login() const { return do_not_prompt_for_login_; } | 182 bool do_not_prompt_for_login() const { return do_not_prompt_for_login_; } |
182 void set_do_not_prompt_for_login(bool do_not_prompt) { | 183 void set_do_not_prompt_for_login(bool do_not_prompt) { |
183 do_not_prompt_for_login_ = do_not_prompt; | 184 do_not_prompt_for_login_ = do_not_prompt; |
184 } | 185 } |
185 const std::string& original_headers() const { return original_headers_; } | 186 const std::string& original_headers() const { return original_headers_; } |
186 | 187 |
188 void InstallBodyReader(mojo::ScopedDataPipeConsumerHandle response_body) { | |
189 DCHECK(!response_body_.is_valid()); | |
190 response_body_ = std::move(response_body); | |
191 } | |
192 mojo::ScopedDataPipeConsumerHandle TakeBodyReader() { | |
193 return std::move(response_body_); | |
194 } | |
195 | |
187 private: | 196 private: |
188 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 197 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
189 DeletedFilterDetached); | 198 DeletedFilterDetached); |
190 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 199 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
191 DeletedFilterDetachedRedirect); | 200 DeletedFilterDetachedRedirect); |
192 // Non-owning, may be NULL. | 201 // Non-owning, may be NULL. |
193 CrossSiteResourceHandler* cross_site_handler_; | 202 CrossSiteResourceHandler* cross_site_handler_; |
194 DetachableResourceHandler* detachable_handler_; | 203 DetachableResourceHandler* detachable_handler_; |
195 | 204 |
196 int process_type_; | 205 int process_type_; |
(...skipping 21 matching lines...) Expand all Loading... | |
218 blink::WebReferrerPolicy referrer_policy_; | 227 blink::WebReferrerPolicy referrer_policy_; |
219 blink::WebPageVisibilityState visibility_state_; | 228 blink::WebPageVisibilityState visibility_state_; |
220 ResourceContext* context_; | 229 ResourceContext* context_; |
221 // The filter might be deleted without deleting this object if the process | 230 // The filter might be deleted without deleting this object if the process |
222 // exits during a transfer. | 231 // exits during a transfer. |
223 base::WeakPtr<ResourceMessageFilter> filter_; | 232 base::WeakPtr<ResourceMessageFilter> filter_; |
224 bool report_raw_headers_; | 233 bool report_raw_headers_; |
225 bool is_async_; | 234 bool is_async_; |
226 bool is_using_lofi_; | 235 bool is_using_lofi_; |
227 const std::string original_headers_; | 236 const std::string original_headers_; |
237 mojo::ScopedDataPipeConsumerHandle response_body_; | |
mmenke
2016/05/23 17:34:53
I'm not actually sure what this is (Needs comments
yhirano
2016/05/24 08:03:21
Removed at PS24.
| |
228 | 238 |
229 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); | 239 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); |
230 }; | 240 }; |
231 | 241 |
232 } // namespace content | 242 } // namespace content |
233 | 243 |
234 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 244 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
OLD | NEW |