| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 request->setHTTPMethod(AtomicString(data->m_httpMethod)); | 43 request->setHTTPMethod(AtomicString(data->m_httpMethod)); |
| 44 request->setPriority(data->m_priority, data->m_intraPriorityValue); | 44 request->setPriority(data->m_priority, data->m_intraPriorityValue); |
| 45 | 45 |
| 46 request->m_httpHeaderFields.adopt(data->m_httpHeaders.release()); | 46 request->m_httpHeaderFields.adopt(data->m_httpHeaders.release()); |
| 47 | 47 |
| 48 request->setHTTPBody(data->m_httpBody); | 48 request->setHTTPBody(data->m_httpBody); |
| 49 request->setAllowStoredCredentials(data->m_allowStoredCredentials); | 49 request->setAllowStoredCredentials(data->m_allowStoredCredentials); |
| 50 request->setReportUploadProgress(data->m_reportUploadProgress); | 50 request->setReportUploadProgress(data->m_reportUploadProgress); |
| 51 request->setHasUserGesture(data->m_hasUserGesture); | 51 request->setHasUserGesture(data->m_hasUserGesture); |
| 52 request->setDownloadToFile(data->m_downloadToFile); | 52 request->setDownloadToFile(data->m_downloadToFile); |
| 53 request->setSkipServiceWorker(data->m_skipServiceWorker); |
| 53 request->setRequestorID(data->m_requestorID); | 54 request->setRequestorID(data->m_requestorID); |
| 54 request->setRequestorProcessID(data->m_requestorProcessID); | 55 request->setRequestorProcessID(data->m_requestorProcessID); |
| 55 request->setAppCacheHostID(data->m_appCacheHostID); | 56 request->setAppCacheHostID(data->m_appCacheHostID); |
| 56 request->setRequestContext(data->m_requestContext); | 57 request->setRequestContext(data->m_requestContext); |
| 57 request->setFrameType(data->m_frameType); | 58 request->setFrameType(data->m_frameType); |
| 58 request->m_referrerPolicy = data->m_referrerPolicy; | 59 request->m_referrerPolicy = data->m_referrerPolicy; |
| 59 return request.release(); | 60 return request.release(); |
| 60 } | 61 } |
| 61 | 62 |
| 62 PassOwnPtr<CrossThreadResourceRequestData> ResourceRequest::copyData() const | 63 PassOwnPtr<CrossThreadResourceRequestData> ResourceRequest::copyData() const |
| 63 { | 64 { |
| 64 OwnPtr<CrossThreadResourceRequestData> data = adoptPtr(new CrossThreadResour
ceRequestData()); | 65 OwnPtr<CrossThreadResourceRequestData> data = adoptPtr(new CrossThreadResour
ceRequestData()); |
| 65 data->m_url = url().copy(); | 66 data->m_url = url().copy(); |
| 66 data->m_cachePolicy = cachePolicy(); | 67 data->m_cachePolicy = cachePolicy(); |
| 67 data->m_timeoutInterval = timeoutInterval(); | 68 data->m_timeoutInterval = timeoutInterval(); |
| 68 data->m_firstPartyForCookies = firstPartyForCookies().copy(); | 69 data->m_firstPartyForCookies = firstPartyForCookies().copy(); |
| 69 data->m_httpMethod = httpMethod().string().isolatedCopy(); | 70 data->m_httpMethod = httpMethod().string().isolatedCopy(); |
| 70 data->m_httpHeaders = httpHeaderFields().copyData(); | 71 data->m_httpHeaders = httpHeaderFields().copyData(); |
| 71 data->m_priority = priority(); | 72 data->m_priority = priority(); |
| 72 data->m_intraPriorityValue = m_intraPriorityValue; | 73 data->m_intraPriorityValue = m_intraPriorityValue; |
| 73 | 74 |
| 74 if (m_httpBody) | 75 if (m_httpBody) |
| 75 data->m_httpBody = m_httpBody->deepCopy(); | 76 data->m_httpBody = m_httpBody->deepCopy(); |
| 76 data->m_allowStoredCredentials = m_allowStoredCredentials; | 77 data->m_allowStoredCredentials = m_allowStoredCredentials; |
| 77 data->m_reportUploadProgress = m_reportUploadProgress; | 78 data->m_reportUploadProgress = m_reportUploadProgress; |
| 78 data->m_hasUserGesture = m_hasUserGesture; | 79 data->m_hasUserGesture = m_hasUserGesture; |
| 79 data->m_downloadToFile = m_downloadToFile; | 80 data->m_downloadToFile = m_downloadToFile; |
| 81 data->m_skipServiceWorker = m_skipServiceWorker; |
| 80 data->m_requestorID = m_requestorID; | 82 data->m_requestorID = m_requestorID; |
| 81 data->m_requestorProcessID = m_requestorProcessID; | 83 data->m_requestorProcessID = m_requestorProcessID; |
| 82 data->m_appCacheHostID = m_appCacheHostID; | 84 data->m_appCacheHostID = m_appCacheHostID; |
| 83 data->m_requestContext = m_requestContext; | 85 data->m_requestContext = m_requestContext; |
| 84 data->m_frameType = m_frameType; | 86 data->m_frameType = m_frameType; |
| 85 data->m_referrerPolicy = m_referrerPolicy; | 87 data->m_referrerPolicy = m_referrerPolicy; |
| 86 return data.release(); | 88 return data.release(); |
| 87 } | 89 } |
| 88 | 90 |
| 89 bool ResourceRequest::isEmpty() const | 91 bool ResourceRequest::isEmpty() const |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 // This is used by the loader to control the number of issued parallel load requ
ests. | 411 // This is used by the loader to control the number of issued parallel load requ
ests. |
| 410 unsigned initializeMaximumHTTPConnectionCountPerHost() | 412 unsigned initializeMaximumHTTPConnectionCountPerHost() |
| 411 { | 413 { |
| 412 // The chromium network stack already handles limiting the number of | 414 // The chromium network stack already handles limiting the number of |
| 413 // parallel requests per host, so there's no need to do it here. Therefore, | 415 // parallel requests per host, so there's no need to do it here. Therefore, |
| 414 // this is set to a high value that should never be hit in practice. | 416 // this is set to a high value that should never be hit in practice. |
| 415 return 10000; | 417 return 10000; |
| 416 } | 418 } |
| 417 | 419 |
| 418 } | 420 } |
| OLD | NEW |