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