OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. |
3 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 frame_type_(WebURLRequest::kFrameTypeNone), | 68 frame_type_(WebURLRequest::kFrameTypeNone), |
69 fetch_request_mode_(WebURLRequest::kFetchRequestModeNoCORS), | 69 fetch_request_mode_(WebURLRequest::kFetchRequestModeNoCORS), |
70 fetch_credentials_mode_(WebURLRequest::kFetchCredentialsModeInclude), | 70 fetch_credentials_mode_(WebURLRequest::kFetchCredentialsModeInclude), |
71 fetch_redirect_mode_(WebURLRequest::kFetchRedirectModeFollow), | 71 fetch_redirect_mode_(WebURLRequest::kFetchRedirectModeFollow), |
72 previews_state_(WebURLRequest::kPreviewsUnspecified), | 72 previews_state_(WebURLRequest::kPreviewsUnspecified), |
73 referrer_policy_(kReferrerPolicyDefault), | 73 referrer_policy_(kReferrerPolicyDefault), |
74 did_set_http_referrer_(false), | 74 did_set_http_referrer_(false), |
75 check_for_browser_side_navigation_(true), | 75 check_for_browser_side_navigation_(true), |
76 ui_start_time_(0), | 76 ui_start_time_(0), |
77 is_external_request_(false), | 77 is_external_request_(false), |
| 78 loading_ipc_type_(RuntimeEnabledFeatures::loadingWithMojoEnabled() |
| 79 ? WebURLRequest::LoadingIPCType::kMojo |
| 80 : WebURLRequest::LoadingIPCType::kChromeIPC), |
78 is_same_document_navigation_(false), | 81 is_same_document_navigation_(false), |
79 input_perf_metric_report_policy_( | 82 input_perf_metric_report_policy_( |
80 InputToLoadPerfMetricReportPolicy::kNoReport), | 83 InputToLoadPerfMetricReportPolicy::kNoReport), |
81 redirect_status_(RedirectStatus::kNoRedirect) {} | 84 redirect_status_(RedirectStatus::kNoRedirect) {} |
82 | 85 |
83 ResourceRequest::ResourceRequest(CrossThreadResourceRequestData* data) | 86 ResourceRequest::ResourceRequest(CrossThreadResourceRequestData* data) |
84 : ResourceRequest(data->url_) { | 87 : ResourceRequest(data->url_) { |
85 SetCachePolicy(data->cache_policy_); | 88 SetCachePolicy(data->cache_policy_); |
86 SetTimeoutInterval(data->timeout_interval_); | 89 SetTimeoutInterval(data->timeout_interval_); |
87 SetFirstPartyForCookies(data->first_party_for_cookies_); | 90 SetFirstPartyForCookies(data->first_party_for_cookies_); |
(...skipping 19 matching lines...) Expand all Loading... |
107 SetFrameType(data->frame_type_); | 110 SetFrameType(data->frame_type_); |
108 SetFetchRequestMode(data->fetch_request_mode_); | 111 SetFetchRequestMode(data->fetch_request_mode_); |
109 SetFetchCredentialsMode(data->fetch_credentials_mode_); | 112 SetFetchCredentialsMode(data->fetch_credentials_mode_); |
110 SetFetchRedirectMode(data->fetch_redirect_mode_); | 113 SetFetchRedirectMode(data->fetch_redirect_mode_); |
111 SetPreviewsState(data->previews_state_); | 114 SetPreviewsState(data->previews_state_); |
112 referrer_policy_ = data->referrer_policy_; | 115 referrer_policy_ = data->referrer_policy_; |
113 did_set_http_referrer_ = data->did_set_http_referrer_; | 116 did_set_http_referrer_ = data->did_set_http_referrer_; |
114 check_for_browser_side_navigation_ = data->check_for_browser_side_navigation_; | 117 check_for_browser_side_navigation_ = data->check_for_browser_side_navigation_; |
115 ui_start_time_ = data->ui_start_time_; | 118 ui_start_time_ = data->ui_start_time_; |
116 is_external_request_ = data->is_external_request_; | 119 is_external_request_ = data->is_external_request_; |
| 120 loading_ipc_type_ = data->loading_ipc_type_; |
117 input_perf_metric_report_policy_ = data->input_perf_metric_report_policy_; | 121 input_perf_metric_report_policy_ = data->input_perf_metric_report_policy_; |
118 redirect_status_ = data->redirect_status_; | 122 redirect_status_ = data->redirect_status_; |
119 } | 123 } |
120 | 124 |
121 ResourceRequest::ResourceRequest(const ResourceRequest&) = default; | 125 ResourceRequest::ResourceRequest(const ResourceRequest&) = default; |
122 | 126 |
123 ResourceRequest& ResourceRequest::operator=(const ResourceRequest&) = default; | 127 ResourceRequest& ResourceRequest::operator=(const ResourceRequest&) = default; |
124 | 128 |
125 std::unique_ptr<CrossThreadResourceRequestData> ResourceRequest::CopyData() | 129 std::unique_ptr<CrossThreadResourceRequestData> ResourceRequest::CopyData() |
126 const { | 130 const { |
(...skipping 28 matching lines...) Expand all Loading... |
155 data->frame_type_ = frame_type_; | 159 data->frame_type_ = frame_type_; |
156 data->fetch_request_mode_ = fetch_request_mode_; | 160 data->fetch_request_mode_ = fetch_request_mode_; |
157 data->fetch_credentials_mode_ = fetch_credentials_mode_; | 161 data->fetch_credentials_mode_ = fetch_credentials_mode_; |
158 data->fetch_redirect_mode_ = fetch_redirect_mode_; | 162 data->fetch_redirect_mode_ = fetch_redirect_mode_; |
159 data->previews_state_ = previews_state_; | 163 data->previews_state_ = previews_state_; |
160 data->referrer_policy_ = referrer_policy_; | 164 data->referrer_policy_ = referrer_policy_; |
161 data->did_set_http_referrer_ = did_set_http_referrer_; | 165 data->did_set_http_referrer_ = did_set_http_referrer_; |
162 data->check_for_browser_side_navigation_ = check_for_browser_side_navigation_; | 166 data->check_for_browser_side_navigation_ = check_for_browser_side_navigation_; |
163 data->ui_start_time_ = ui_start_time_; | 167 data->ui_start_time_ = ui_start_time_; |
164 data->is_external_request_ = is_external_request_; | 168 data->is_external_request_ = is_external_request_; |
| 169 data->loading_ipc_type_ = loading_ipc_type_; |
165 data->input_perf_metric_report_policy_ = input_perf_metric_report_policy_; | 170 data->input_perf_metric_report_policy_ = input_perf_metric_report_policy_; |
166 data->redirect_status_ = redirect_status_; | 171 data->redirect_status_ = redirect_status_; |
167 return data; | 172 return data; |
168 } | 173 } |
169 | 174 |
170 bool ResourceRequest::IsEmpty() const { | 175 bool ResourceRequest::IsEmpty() const { |
171 return url_.IsEmpty(); | 176 return url_.IsEmpty(); |
172 } | 177 } |
173 | 178 |
174 bool ResourceRequest::IsNull() const { | 179 bool ResourceRequest::IsNull() const { |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 // layer. | 423 // layer. |
419 if (HttpMethod() == HTTPNames::GET || HttpMethod() == HTTPNames::HEAD) | 424 if (HttpMethod() == HTTPNames::GET || HttpMethod() == HTTPNames::HEAD) |
420 return false; | 425 return false; |
421 | 426 |
422 // For non-GET and non-HEAD methods, always send an Origin header so the | 427 // For non-GET and non-HEAD methods, always send an Origin header so the |
423 // server knows we support this feature. | 428 // server knows we support this feature. |
424 return true; | 429 return true; |
425 } | 430 } |
426 | 431 |
427 } // namespace blink | 432 } // namespace blink |
OLD | NEW |