| 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 22 matching lines...) Expand all  Loading... | 
| 33 | 33 | 
| 34 double ResourceRequest::s_defaultTimeoutInterval = INT_MAX; | 34 double ResourceRequest::s_defaultTimeoutInterval = INT_MAX; | 
| 35 | 35 | 
| 36 PassOwnPtr<ResourceRequest> ResourceRequest::adopt(PassOwnPtr<CrossThreadResourc
     eRequestData> data) | 36 PassOwnPtr<ResourceRequest> ResourceRequest::adopt(PassOwnPtr<CrossThreadResourc
     eRequestData> data) | 
| 37 { | 37 { | 
| 38     OwnPtr<ResourceRequest> request = adoptPtr(new ResourceRequest()); | 38     OwnPtr<ResourceRequest> request = adoptPtr(new ResourceRequest()); | 
| 39     request->setURL(data->m_url); | 39     request->setURL(data->m_url); | 
| 40     request->setCachePolicy(data->m_cachePolicy); | 40     request->setCachePolicy(data->m_cachePolicy); | 
| 41     request->setTimeoutInterval(data->m_timeoutInterval); | 41     request->setTimeoutInterval(data->m_timeoutInterval); | 
| 42     request->setFirstPartyForCookies(data->m_firstPartyForCookies); | 42     request->setFirstPartyForCookies(data->m_firstPartyForCookies); | 
|  | 43     request->setRequestorOrigin(data->m_requestorOrigin); | 
| 43     request->setHTTPMethod(AtomicString(data->m_httpMethod)); | 44     request->setHTTPMethod(AtomicString(data->m_httpMethod)); | 
| 44     request->setPriority(data->m_priority, data->m_intraPriorityValue); | 45     request->setPriority(data->m_priority, data->m_intraPriorityValue); | 
| 45 | 46 | 
| 46     request->m_httpHeaderFields.adopt(data->m_httpHeaders.release()); | 47     request->m_httpHeaderFields.adopt(data->m_httpHeaders.release()); | 
| 47 | 48 | 
| 48     request->setHTTPBody(data->m_httpBody); | 49     request->setHTTPBody(data->m_httpBody); | 
| 49     request->setAllowStoredCredentials(data->m_allowStoredCredentials); | 50     request->setAllowStoredCredentials(data->m_allowStoredCredentials); | 
| 50     request->setReportUploadProgress(data->m_reportUploadProgress); | 51     request->setReportUploadProgress(data->m_reportUploadProgress); | 
| 51     request->setHasUserGesture(data->m_hasUserGesture); | 52     request->setHasUserGesture(data->m_hasUserGesture); | 
| 52     request->setDownloadToFile(data->m_downloadToFile); | 53     request->setDownloadToFile(data->m_downloadToFile); | 
| (...skipping 17 matching lines...) Expand all  Loading... | 
| 70     return request.release(); | 71     return request.release(); | 
| 71 } | 72 } | 
| 72 | 73 | 
| 73 PassOwnPtr<CrossThreadResourceRequestData> ResourceRequest::copyData() const | 74 PassOwnPtr<CrossThreadResourceRequestData> ResourceRequest::copyData() const | 
| 74 { | 75 { | 
| 75     OwnPtr<CrossThreadResourceRequestData> data = adoptPtr(new CrossThreadResour
     ceRequestData()); | 76     OwnPtr<CrossThreadResourceRequestData> data = adoptPtr(new CrossThreadResour
     ceRequestData()); | 
| 76     data->m_url = url().copy(); | 77     data->m_url = url().copy(); | 
| 77     data->m_cachePolicy = cachePolicy(); | 78     data->m_cachePolicy = cachePolicy(); | 
| 78     data->m_timeoutInterval = timeoutInterval(); | 79     data->m_timeoutInterval = timeoutInterval(); | 
| 79     data->m_firstPartyForCookies = firstPartyForCookies().copy(); | 80     data->m_firstPartyForCookies = firstPartyForCookies().copy(); | 
|  | 81     data->m_requestorOrigin = requestorOrigin() ? requestorOrigin()->isolatedCop
     y() : nullptr; | 
| 80     data->m_httpMethod = httpMethod().string().isolatedCopy(); | 82     data->m_httpMethod = httpMethod().string().isolatedCopy(); | 
| 81     data->m_httpHeaders = httpHeaderFields().copyData(); | 83     data->m_httpHeaders = httpHeaderFields().copyData(); | 
| 82     data->m_priority = priority(); | 84     data->m_priority = priority(); | 
| 83     data->m_intraPriorityValue = m_intraPriorityValue; | 85     data->m_intraPriorityValue = m_intraPriorityValue; | 
| 84 | 86 | 
| 85     if (m_httpBody) | 87     if (m_httpBody) | 
| 86         data->m_httpBody = m_httpBody->deepCopy(); | 88         data->m_httpBody = m_httpBody->deepCopy(); | 
| 87     data->m_allowStoredCredentials = m_allowStoredCredentials; | 89     data->m_allowStoredCredentials = m_allowStoredCredentials; | 
| 88     data->m_reportUploadProgress = m_reportUploadProgress; | 90     data->m_reportUploadProgress = m_reportUploadProgress; | 
| 89     data->m_hasUserGesture = m_hasUserGesture; | 91     data->m_hasUserGesture = m_hasUserGesture; | 
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 160 const KURL& ResourceRequest::firstPartyForCookies() const | 162 const KURL& ResourceRequest::firstPartyForCookies() const | 
| 161 { | 163 { | 
| 162     return m_firstPartyForCookies; | 164     return m_firstPartyForCookies; | 
| 163 } | 165 } | 
| 164 | 166 | 
| 165 void ResourceRequest::setFirstPartyForCookies(const KURL& firstPartyForCookies) | 167 void ResourceRequest::setFirstPartyForCookies(const KURL& firstPartyForCookies) | 
| 166 { | 168 { | 
| 167     m_firstPartyForCookies = firstPartyForCookies; | 169     m_firstPartyForCookies = firstPartyForCookies; | 
| 168 } | 170 } | 
| 169 | 171 | 
|  | 172 PassRefPtr<SecurityOrigin> ResourceRequest::requestorOrigin() const | 
|  | 173 { | 
|  | 174     return m_requestorOrigin; | 
|  | 175 } | 
|  | 176 | 
|  | 177 void ResourceRequest::setRequestorOrigin(PassRefPtr<SecurityOrigin> requestorOri
     gin) | 
|  | 178 { | 
|  | 179     m_requestorOrigin = requestorOrigin; | 
|  | 180 } | 
|  | 181 | 
| 170 const AtomicString& ResourceRequest::httpMethod() const | 182 const AtomicString& ResourceRequest::httpMethod() const | 
| 171 { | 183 { | 
| 172     return m_httpMethod; | 184     return m_httpMethod; | 
| 173 } | 185 } | 
| 174 | 186 | 
| 175 void ResourceRequest::setHTTPMethod(const AtomicString& httpMethod) | 187 void ResourceRequest::setHTTPMethod(const AtomicString& httpMethod) | 
| 176 { | 188 { | 
| 177     m_httpMethod = httpMethod; | 189     m_httpMethod = httpMethod; | 
| 178 } | 190 } | 
| 179 | 191 | 
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 459 // This is used by the loader to control the number of issued parallel load requ
     ests. | 471 // This is used by the loader to control the number of issued parallel load requ
     ests. | 
| 460 unsigned initializeMaximumHTTPConnectionCountPerHost() | 472 unsigned initializeMaximumHTTPConnectionCountPerHost() | 
| 461 { | 473 { | 
| 462     // The chromium network stack already handles limiting the number of | 474     // The chromium network stack already handles limiting the number of | 
| 463     // parallel requests per host, so there's no need to do it here.  Therefore, | 475     // parallel requests per host, so there's no need to do it here.  Therefore, | 
| 464     // this is set to a high value that should never be hit in practice. | 476     // this is set to a high value that should never be hit in practice. | 
| 465     return 10000; | 477     return 10000; | 
| 466 } | 478 } | 
| 467 | 479 | 
| 468 } // namespace blink | 480 } // namespace blink | 
| OLD | NEW | 
|---|