| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 request->m_httpHeaderFields.adopt(data->m_httpHeaders.release()); | 45 request->m_httpHeaderFields.adopt(data->m_httpHeaders.release()); |
| 46 | 46 |
| 47 request->setHTTPBody(data->m_httpBody); | 47 request->setHTTPBody(data->m_httpBody); |
| 48 request->setAllowStoredCredentials(data->m_allowStoredCredentials); | 48 request->setAllowStoredCredentials(data->m_allowStoredCredentials); |
| 49 request->setReportUploadProgress(data->m_reportUploadProgress); | 49 request->setReportUploadProgress(data->m_reportUploadProgress); |
| 50 request->setHasUserGesture(data->m_hasUserGesture); | 50 request->setHasUserGesture(data->m_hasUserGesture); |
| 51 request->setDownloadToFile(data->m_downloadToFile); | 51 request->setDownloadToFile(data->m_downloadToFile); |
| 52 request->setRequestorID(data->m_requestorID); | 52 request->setRequestorID(data->m_requestorID); |
| 53 request->setRequestorProcessID(data->m_requestorProcessID); | 53 request->setRequestorProcessID(data->m_requestorProcessID); |
| 54 request->setAppCacheHostID(data->m_appCacheHostID); | 54 request->setAppCacheHostID(data->m_appCacheHostID); |
| 55 request->setTargetType(data->m_targetType); | 55 request->setRequestContext(data->m_requestContext); |
| 56 request->m_referrerPolicy = data->m_referrerPolicy; | 56 request->m_referrerPolicy = data->m_referrerPolicy; |
| 57 return request.release(); | 57 return request.release(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 PassOwnPtr<CrossThreadResourceRequestData> ResourceRequest::copyData() const | 60 PassOwnPtr<CrossThreadResourceRequestData> ResourceRequest::copyData() const |
| 61 { | 61 { |
| 62 OwnPtr<CrossThreadResourceRequestData> data = adoptPtr(new CrossThreadResour
ceRequestData()); | 62 OwnPtr<CrossThreadResourceRequestData> data = adoptPtr(new CrossThreadResour
ceRequestData()); |
| 63 data->m_url = url().copy(); | 63 data->m_url = url().copy(); |
| 64 data->m_cachePolicy = cachePolicy(); | 64 data->m_cachePolicy = cachePolicy(); |
| 65 data->m_timeoutInterval = timeoutInterval(); | 65 data->m_timeoutInterval = timeoutInterval(); |
| 66 data->m_firstPartyForCookies = firstPartyForCookies().copy(); | 66 data->m_firstPartyForCookies = firstPartyForCookies().copy(); |
| 67 data->m_httpMethod = httpMethod().string().isolatedCopy(); | 67 data->m_httpMethod = httpMethod().string().isolatedCopy(); |
| 68 data->m_httpHeaders = httpHeaderFields().copyData(); | 68 data->m_httpHeaders = httpHeaderFields().copyData(); |
| 69 data->m_priority = priority(); | 69 data->m_priority = priority(); |
| 70 data->m_intraPriorityValue = m_intraPriorityValue; | 70 data->m_intraPriorityValue = m_intraPriorityValue; |
| 71 | 71 |
| 72 if (m_httpBody) | 72 if (m_httpBody) |
| 73 data->m_httpBody = m_httpBody->deepCopy(); | 73 data->m_httpBody = m_httpBody->deepCopy(); |
| 74 data->m_allowStoredCredentials = m_allowStoredCredentials; | 74 data->m_allowStoredCredentials = m_allowStoredCredentials; |
| 75 data->m_reportUploadProgress = m_reportUploadProgress; | 75 data->m_reportUploadProgress = m_reportUploadProgress; |
| 76 data->m_hasUserGesture = m_hasUserGesture; | 76 data->m_hasUserGesture = m_hasUserGesture; |
| 77 data->m_downloadToFile = m_downloadToFile; | 77 data->m_downloadToFile = m_downloadToFile; |
| 78 data->m_requestorID = m_requestorID; | 78 data->m_requestorID = m_requestorID; |
| 79 data->m_requestorProcessID = m_requestorProcessID; | 79 data->m_requestorProcessID = m_requestorProcessID; |
| 80 data->m_appCacheHostID = m_appCacheHostID; | 80 data->m_appCacheHostID = m_appCacheHostID; |
| 81 data->m_targetType = m_targetType; | |
| 82 data->m_referrerPolicy = m_referrerPolicy; | 81 data->m_referrerPolicy = m_referrerPolicy; |
| 83 return data.release(); | 82 return data.release(); |
| 84 } | 83 } |
| 85 | 84 |
| 86 bool ResourceRequest::isEmpty() const | 85 bool ResourceRequest::isEmpty() const |
| 87 { | 86 { |
| 88 return m_url.isEmpty(); | 87 return m_url.isEmpty(); |
| 89 } | 88 } |
| 90 | 89 |
| 91 bool ResourceRequest::isNull() const | 90 bool ResourceRequest::isNull() const |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 m_allowStoredCredentials = true; | 389 m_allowStoredCredentials = true; |
| 391 m_reportUploadProgress = false; | 390 m_reportUploadProgress = false; |
| 392 m_reportRawHeaders = false; | 391 m_reportRawHeaders = false; |
| 393 m_hasUserGesture = false; | 392 m_hasUserGesture = false; |
| 394 m_downloadToFile = false; | 393 m_downloadToFile = false; |
| 395 m_priority = ResourceLoadPriorityLow; | 394 m_priority = ResourceLoadPriorityLow; |
| 396 m_intraPriorityValue = 0; | 395 m_intraPriorityValue = 0; |
| 397 m_requestorID = 0; | 396 m_requestorID = 0; |
| 398 m_requestorProcessID = 0; | 397 m_requestorProcessID = 0; |
| 399 m_appCacheHostID = 0; | 398 m_appCacheHostID = 0; |
| 400 m_targetType = TargetIsUnspecified; | 399 m_requestContext = UnspecifiedContext; |
| 401 m_referrerPolicy = ReferrerPolicyDefault; | 400 m_referrerPolicy = ReferrerPolicyDefault; |
| 402 } | 401 } |
| 403 | 402 |
| 404 // This is used by the loader to control the number of issued parallel load requ
ests. | 403 // This is used by the loader to control the number of issued parallel load requ
ests. |
| 405 unsigned initializeMaximumHTTPConnectionCountPerHost() | 404 unsigned initializeMaximumHTTPConnectionCountPerHost() |
| 406 { | 405 { |
| 407 // The chromium network stack already handles limiting the number of | 406 // The chromium network stack already handles limiting the number of |
| 408 // parallel requests per host, so there's no need to do it here. Therefore, | 407 // parallel requests per host, so there's no need to do it here. Therefore, |
| 409 // this is set to a high value that should never be hit in practice. | 408 // this is set to a high value that should never be hit in practice. |
| 410 return 10000; | 409 return 10000; |
| 411 } | 410 } |
| 412 | 411 |
| 413 } | 412 } |
| OLD | NEW |