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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 setFetchCredentialsMode(data->m_fetchCredentialsMode); | 86 setFetchCredentialsMode(data->m_fetchCredentialsMode); |
87 setFetchRedirectMode(data->m_fetchRedirectMode); | 87 setFetchRedirectMode(data->m_fetchRedirectMode); |
88 setLoFiState(data->m_loFiState); | 88 setLoFiState(data->m_loFiState); |
89 m_referrerPolicy = data->m_referrerPolicy; | 89 m_referrerPolicy = data->m_referrerPolicy; |
90 m_didSetHTTPReferrer = data->m_didSetHTTPReferrer; | 90 m_didSetHTTPReferrer = data->m_didSetHTTPReferrer; |
91 m_checkForBrowserSideNavigation = data->m_checkForBrowserSideNavigation; | 91 m_checkForBrowserSideNavigation = data->m_checkForBrowserSideNavigation; |
92 m_uiStartTime = data->m_uiStartTime; | 92 m_uiStartTime = data->m_uiStartTime; |
93 m_isExternalRequest = data->m_isExternalRequest; | 93 m_isExternalRequest = data->m_isExternalRequest; |
94 m_inputPerfMetricReportPolicy = data->m_inputPerfMetricReportPolicy; | 94 m_inputPerfMetricReportPolicy = data->m_inputPerfMetricReportPolicy; |
95 m_redirectStatus = data->m_redirectStatus; | 95 m_redirectStatus = data->m_redirectStatus; |
| 96 m_interventionsInfo = InterventionsFlag::InterventionNone; |
96 } | 97 } |
97 | 98 |
98 ResourceRequest::ResourceRequest(const ResourceRequest&) = default; | 99 ResourceRequest::ResourceRequest(const ResourceRequest&) = default; |
99 | 100 |
100 ResourceRequest& ResourceRequest::operator=(const ResourceRequest&) = default; | 101 ResourceRequest& ResourceRequest::operator=(const ResourceRequest&) = default; |
101 | 102 |
102 std::unique_ptr<CrossThreadResourceRequestData> ResourceRequest::copyData() cons
t | 103 std::unique_ptr<CrossThreadResourceRequestData> ResourceRequest::copyData() cons
t |
103 { | 104 { |
104 std::unique_ptr<CrossThreadResourceRequestData> data = wrapUnique(new CrossT
hreadResourceRequestData()); | 105 std::unique_ptr<CrossThreadResourceRequestData> data = wrapUnique(new CrossT
hreadResourceRequestData()); |
105 data->m_url = url().copy(); | 106 data->m_url = url().copy(); |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 { | 333 { |
333 return m_priority; | 334 return m_priority; |
334 } | 335 } |
335 | 336 |
336 void ResourceRequest::setPriority(ResourceLoadPriority priority, int intraPriori
tyValue) | 337 void ResourceRequest::setPriority(ResourceLoadPriority priority, int intraPriori
tyValue) |
337 { | 338 { |
338 m_priority = priority; | 339 m_priority = priority; |
339 m_intraPriorityValue = intraPriorityValue; | 340 m_intraPriorityValue = intraPriorityValue; |
340 } | 341 } |
341 | 342 |
| 343 ResourceLoadPriority ResourceRequest::computePriorityForInterventions(ResourceLo
adPriority priority) const |
| 344 { |
| 345 if (m_interventionsInfo & InterventionsFlag::InterventionBlockedDocWriteScri
ptAsyncFetch) |
| 346 return ResourceLoadPriorityLowest; |
| 347 return priority; |
| 348 } |
| 349 |
342 void ResourceRequest::addHTTPHeaderField(const AtomicString& name, const AtomicS
tring& value) | 350 void ResourceRequest::addHTTPHeaderField(const AtomicString& name, const AtomicS
tring& value) |
343 { | 351 { |
344 HTTPHeaderMap::AddResult result = m_httpHeaderFields.add(name, value); | 352 HTTPHeaderMap::AddResult result = m_httpHeaderFields.add(name, value); |
345 if (!result.isNewEntry) | 353 if (!result.isNewEntry) |
346 result.storedValue->value = result.storedValue->value + ',' + value; | 354 result.storedValue->value = result.storedValue->value + ',' + value; |
347 } | 355 } |
348 | 356 |
349 void ResourceRequest::addHTTPHeaderFields(const HTTPHeaderMap& headerFields) | 357 void ResourceRequest::addHTTPHeaderFields(const HTTPHeaderMap& headerFields) |
350 { | 358 { |
351 HTTPHeaderMap::const_iterator end = headerFields.end(); | 359 HTTPHeaderMap::const_iterator end = headerFields.end(); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 m_fetchRedirectMode = WebURLRequest::FetchRedirectModeFollow; | 450 m_fetchRedirectMode = WebURLRequest::FetchRedirectModeFollow; |
443 m_referrerPolicy = ReferrerPolicyDefault; | 451 m_referrerPolicy = ReferrerPolicyDefault; |
444 m_loFiState = WebURLRequest::LoFiUnspecified; | 452 m_loFiState = WebURLRequest::LoFiUnspecified; |
445 m_didSetHTTPReferrer = false; | 453 m_didSetHTTPReferrer = false; |
446 m_checkForBrowserSideNavigation = true; | 454 m_checkForBrowserSideNavigation = true; |
447 m_uiStartTime = 0; | 455 m_uiStartTime = 0; |
448 m_isExternalRequest = false; | 456 m_isExternalRequest = false; |
449 m_inputPerfMetricReportPolicy = InputToLoadPerfMetricReportPolicy::NoReport; | 457 m_inputPerfMetricReportPolicy = InputToLoadPerfMetricReportPolicy::NoReport; |
450 m_redirectStatus = RedirectStatus::NoRedirect; | 458 m_redirectStatus = RedirectStatus::NoRedirect; |
451 m_requestorOrigin = SecurityOrigin::createUnique(); | 459 m_requestorOrigin = SecurityOrigin::createUnique(); |
| 460 m_interventionsInfo = InterventionsFlag::InterventionNone; |
452 } | 461 } |
453 | 462 |
454 } // namespace blink | 463 } // namespace blink |
OLD | NEW |