| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 request->setRequestorID(data->m_requestorID); | 56 request->setRequestorID(data->m_requestorID); |
| 57 request->setRequestorProcessID(data->m_requestorProcessID); | 57 request->setRequestorProcessID(data->m_requestorProcessID); |
| 58 request->setAppCacheHostID(data->m_appCacheHostID); | 58 request->setAppCacheHostID(data->m_appCacheHostID); |
| 59 request->setRequestContext(data->m_requestContext); | 59 request->setRequestContext(data->m_requestContext); |
| 60 request->setFrameType(data->m_frameType); | 60 request->setFrameType(data->m_frameType); |
| 61 request->setFetchRequestMode(data->m_fetchRequestMode); | 61 request->setFetchRequestMode(data->m_fetchRequestMode); |
| 62 request->setFetchCredentialsMode(data->m_fetchCredentialsMode); | 62 request->setFetchCredentialsMode(data->m_fetchCredentialsMode); |
| 63 request->m_referrerPolicy = data->m_referrerPolicy; | 63 request->m_referrerPolicy = data->m_referrerPolicy; |
| 64 request->m_checkForBrowserSideNavigation = data->m_checkForBrowserSideNaviga
tion; | 64 request->m_checkForBrowserSideNavigation = data->m_checkForBrowserSideNaviga
tion; |
| 65 request->m_uiStartTime = data->m_uiStartTime; | 65 request->m_uiStartTime = data->m_uiStartTime; |
| 66 request->m_originatesFromReservedIPRange = data->m_originatesFromReservedIPR
ange; |
| 66 request->m_inputPerfMetricReportPolicy = data->m_inputPerfMetricReportPolicy
; | 67 request->m_inputPerfMetricReportPolicy = data->m_inputPerfMetricReportPolicy
; |
| 67 return request.release(); | 68 return request.release(); |
| 68 } | 69 } |
| 69 | 70 |
| 70 PassOwnPtr<CrossThreadResourceRequestData> ResourceRequest::copyData() const | 71 PassOwnPtr<CrossThreadResourceRequestData> ResourceRequest::copyData() const |
| 71 { | 72 { |
| 72 OwnPtr<CrossThreadResourceRequestData> data = adoptPtr(new CrossThreadResour
ceRequestData()); | 73 OwnPtr<CrossThreadResourceRequestData> data = adoptPtr(new CrossThreadResour
ceRequestData()); |
| 73 data->m_url = url().copy(); | 74 data->m_url = url().copy(); |
| 74 data->m_cachePolicy = cachePolicy(); | 75 data->m_cachePolicy = cachePolicy(); |
| 75 data->m_timeoutInterval = timeoutInterval(); | 76 data->m_timeoutInterval = timeoutInterval(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 91 data->m_requestorID = m_requestorID; | 92 data->m_requestorID = m_requestorID; |
| 92 data->m_requestorProcessID = m_requestorProcessID; | 93 data->m_requestorProcessID = m_requestorProcessID; |
| 93 data->m_appCacheHostID = m_appCacheHostID; | 94 data->m_appCacheHostID = m_appCacheHostID; |
| 94 data->m_requestContext = m_requestContext; | 95 data->m_requestContext = m_requestContext; |
| 95 data->m_frameType = m_frameType; | 96 data->m_frameType = m_frameType; |
| 96 data->m_fetchRequestMode = m_fetchRequestMode; | 97 data->m_fetchRequestMode = m_fetchRequestMode; |
| 97 data->m_fetchCredentialsMode = m_fetchCredentialsMode; | 98 data->m_fetchCredentialsMode = m_fetchCredentialsMode; |
| 98 data->m_referrerPolicy = m_referrerPolicy; | 99 data->m_referrerPolicy = m_referrerPolicy; |
| 99 data->m_checkForBrowserSideNavigation = m_checkForBrowserSideNavigation; | 100 data->m_checkForBrowserSideNavigation = m_checkForBrowserSideNavigation; |
| 100 data->m_uiStartTime = m_uiStartTime; | 101 data->m_uiStartTime = m_uiStartTime; |
| 102 data->m_originatesFromReservedIPRange = m_originatesFromReservedIPRange; |
| 101 data->m_inputPerfMetricReportPolicy = m_inputPerfMetricReportPolicy; | 103 data->m_inputPerfMetricReportPolicy = m_inputPerfMetricReportPolicy; |
| 102 return data.release(); | 104 return data.release(); |
| 103 } | 105 } |
| 104 | 106 |
| 105 bool ResourceRequest::isEmpty() const | 107 bool ResourceRequest::isEmpty() const |
| 106 { | 108 { |
| 107 return m_url.isEmpty(); | 109 return m_url.isEmpty(); |
| 108 } | 110 } |
| 109 | 111 |
| 110 bool ResourceRequest::isNull() const | 112 bool ResourceRequest::isNull() const |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 m_requestContext = WebURLRequest::RequestContextUnspecified; | 433 m_requestContext = WebURLRequest::RequestContextUnspecified; |
| 432 m_frameType = WebURLRequest::FrameTypeNone; | 434 m_frameType = WebURLRequest::FrameTypeNone; |
| 433 m_fetchRequestMode = WebURLRequest::FetchRequestModeNoCORS; | 435 m_fetchRequestMode = WebURLRequest::FetchRequestModeNoCORS; |
| 434 // Contrary to the Fetch spec, we default to same-origin mode here, and deal | 436 // Contrary to the Fetch spec, we default to same-origin mode here, and deal |
| 435 // with CORS modes in updateRequestForAccessControl if we're called in a | 437 // with CORS modes in updateRequestForAccessControl if we're called in a |
| 436 // context which requires it. | 438 // context which requires it. |
| 437 m_fetchCredentialsMode = WebURLRequest::FetchCredentialsModeSameOrigin; | 439 m_fetchCredentialsMode = WebURLRequest::FetchCredentialsModeSameOrigin; |
| 438 m_referrerPolicy = ReferrerPolicyDefault; | 440 m_referrerPolicy = ReferrerPolicyDefault; |
| 439 m_checkForBrowserSideNavigation = true; | 441 m_checkForBrowserSideNavigation = true; |
| 440 m_uiStartTime = 0; | 442 m_uiStartTime = 0; |
| 443 m_originatesFromReservedIPRange = false; |
| 441 m_inputPerfMetricReportPolicy = InputToLoadPerfMetricReportPolicy::NoReport; | 444 m_inputPerfMetricReportPolicy = InputToLoadPerfMetricReportPolicy::NoReport; |
| 442 } | 445 } |
| 443 | 446 |
| 444 // This is used by the loader to control the number of issued parallel load requ
ests. | 447 // This is used by the loader to control the number of issued parallel load requ
ests. |
| 445 unsigned initializeMaximumHTTPConnectionCountPerHost() | 448 unsigned initializeMaximumHTTPConnectionCountPerHost() |
| 446 { | 449 { |
| 447 // The chromium network stack already handles limiting the number of | 450 // The chromium network stack already handles limiting the number of |
| 448 // parallel requests per host, so there's no need to do it here. Therefore, | 451 // parallel requests per host, so there's no need to do it here. Therefore, |
| 449 // this is set to a high value that should never be hit in practice. | 452 // this is set to a high value that should never be hit in practice. |
| 450 return 10000; | 453 return 10000; |
| 451 } | 454 } |
| 452 | 455 |
| 453 } // namespace blink | 456 } // namespace blink |
| OLD | NEW |