| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 m_uiStartTime = data->m_uiStartTime; | 70 m_uiStartTime = data->m_uiStartTime; |
| 71 m_originatesFromReservedIPRange = data->m_originatesFromReservedIPRange; | 71 m_originatesFromReservedIPRange = data->m_originatesFromReservedIPRange; |
| 72 m_inputPerfMetricReportPolicy = data->m_inputPerfMetricReportPolicy; | 72 m_inputPerfMetricReportPolicy = data->m_inputPerfMetricReportPolicy; |
| 73 m_followedRedirect = data->m_followedRedirect; | 73 m_followedRedirect = data->m_followedRedirect; |
| 74 } | 74 } |
| 75 | 75 |
| 76 PassOwnPtr<CrossThreadResourceRequestData> ResourceRequest::copyData() const | 76 PassOwnPtr<CrossThreadResourceRequestData> ResourceRequest::copyData() const |
| 77 { | 77 { |
| 78 OwnPtr<CrossThreadResourceRequestData> data = adoptPtr(new CrossThreadResour
ceRequestData()); | 78 OwnPtr<CrossThreadResourceRequestData> data = adoptPtr(new CrossThreadResour
ceRequestData()); |
| 79 data->m_url = url().copy(); | 79 data->m_url = url().copy(); |
| 80 data->m_cachePolicy = cachePolicy(); | 80 data->m_cachePolicy = getCachePolicy(); |
| 81 data->m_timeoutInterval = timeoutInterval(); | 81 data->m_timeoutInterval = timeoutInterval(); |
| 82 data->m_firstPartyForCookies = firstPartyForCookies().copy(); | 82 data->m_firstPartyForCookies = firstPartyForCookies().copy(); |
| 83 data->m_requestorOrigin = requestorOrigin() ? requestorOrigin()->isolatedCop
y() : nullptr; | 83 data->m_requestorOrigin = requestorOrigin() ? requestorOrigin()->isolatedCop
y() : nullptr; |
| 84 data->m_httpMethod = httpMethod().string().isolatedCopy(); | 84 data->m_httpMethod = httpMethod().string().isolatedCopy(); |
| 85 data->m_httpHeaders = httpHeaderFields().copyData(); | 85 data->m_httpHeaders = httpHeaderFields().copyData(); |
| 86 data->m_priority = priority(); | 86 data->m_priority = priority(); |
| 87 data->m_intraPriorityValue = m_intraPriorityValue; | 87 data->m_intraPriorityValue = m_intraPriorityValue; |
| 88 | 88 |
| 89 if (m_httpBody) | 89 if (m_httpBody) |
| 90 data->m_httpBody = m_httpBody->deepCopy(); | 90 data->m_httpBody = m_httpBody->deepCopy(); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 136 |
| 137 void ResourceRequest::removeCredentials() | 137 void ResourceRequest::removeCredentials() |
| 138 { | 138 { |
| 139 if (m_url.user().isEmpty() && m_url.pass().isEmpty()) | 139 if (m_url.user().isEmpty() && m_url.pass().isEmpty()) |
| 140 return; | 140 return; |
| 141 | 141 |
| 142 m_url.setUser(String()); | 142 m_url.setUser(String()); |
| 143 m_url.setPass(String()); | 143 m_url.setPass(String()); |
| 144 } | 144 } |
| 145 | 145 |
| 146 ResourceRequestCachePolicy ResourceRequest::cachePolicy() const | 146 ResourceRequestCachePolicy ResourceRequest::getCachePolicy() const |
| 147 { | 147 { |
| 148 return m_cachePolicy; | 148 return m_cachePolicy; |
| 149 } | 149 } |
| 150 | 150 |
| 151 void ResourceRequest::setCachePolicy(ResourceRequestCachePolicy cachePolicy) | 151 void ResourceRequest::setCachePolicy(ResourceRequestCachePolicy cachePolicy) |
| 152 { | 152 { |
| 153 m_cachePolicy = cachePolicy; | 153 m_cachePolicy = cachePolicy; |
| 154 } | 154 } |
| 155 | 155 |
| 156 double ResourceRequest::timeoutInterval() const | 156 double ResourceRequest::timeoutInterval() const |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 void ResourceRequest::clearHTTPHeaderField(const AtomicString& name) | 318 void ResourceRequest::clearHTTPHeaderField(const AtomicString& name) |
| 319 { | 319 { |
| 320 m_httpHeaderFields.remove(name); | 320 m_httpHeaderFields.remove(name); |
| 321 } | 321 } |
| 322 | 322 |
| 323 bool equalIgnoringHeaderFields(const ResourceRequest& a, const ResourceRequest&
b) | 323 bool equalIgnoringHeaderFields(const ResourceRequest& a, const ResourceRequest&
b) |
| 324 { | 324 { |
| 325 if (a.url() != b.url()) | 325 if (a.url() != b.url()) |
| 326 return false; | 326 return false; |
| 327 | 327 |
| 328 if (a.cachePolicy() != b.cachePolicy()) | 328 if (a.getCachePolicy() != b.getCachePolicy()) |
| 329 return false; | 329 return false; |
| 330 | 330 |
| 331 if (a.timeoutInterval() != b.timeoutInterval()) | 331 if (a.timeoutInterval() != b.timeoutInterval()) |
| 332 return false; | 332 return false; |
| 333 | 333 |
| 334 if (a.firstPartyForCookies() != b.firstPartyForCookies()) | 334 if (a.firstPartyForCookies() != b.firstPartyForCookies()) |
| 335 return false; | 335 return false; |
| 336 | 336 |
| 337 if (a.httpMethod() != b.httpMethod()) | 337 if (a.httpMethod() != b.httpMethod()) |
| 338 return false; | 338 return false; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 m_didSetHTTPReferrer = false; | 439 m_didSetHTTPReferrer = false; |
| 440 m_checkForBrowserSideNavigation = true; | 440 m_checkForBrowserSideNavigation = true; |
| 441 m_uiStartTime = 0; | 441 m_uiStartTime = 0; |
| 442 m_originatesFromReservedIPRange = false; | 442 m_originatesFromReservedIPRange = false; |
| 443 m_inputPerfMetricReportPolicy = InputToLoadPerfMetricReportPolicy::NoReport; | 443 m_inputPerfMetricReportPolicy = InputToLoadPerfMetricReportPolicy::NoReport; |
| 444 m_followedRedirect = false; | 444 m_followedRedirect = false; |
| 445 m_requestorOrigin = SecurityOrigin::createUnique(); | 445 m_requestorOrigin = SecurityOrigin::createUnique(); |
| 446 } | 446 } |
| 447 | 447 |
| 448 } // namespace blink | 448 } // namespace blink |
| OLD | NEW |