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