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