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 27 matching lines...) Loading... |
38 request->setCachePolicy(data->m_cachePolicy); | 38 request->setCachePolicy(data->m_cachePolicy); |
39 request->setTimeoutInterval(data->m_timeoutInterval); | 39 request->setTimeoutInterval(data->m_timeoutInterval); |
40 request->setFirstPartyForCookies(data->m_firstPartyForCookies); | 40 request->setFirstPartyForCookies(data->m_firstPartyForCookies); |
41 request->setHTTPMethod(data->m_httpMethod); | 41 request->setHTTPMethod(data->m_httpMethod); |
42 request->setPriority(data->m_priority); | 42 request->setPriority(data->m_priority); |
43 | 43 |
44 request->m_httpHeaderFields.adopt(data->m_httpHeaders.release()); | 44 request->m_httpHeaderFields.adopt(data->m_httpHeaders.release()); |
45 | 45 |
46 request->setHTTPBody(data->m_httpBody); | 46 request->setHTTPBody(data->m_httpBody); |
47 request->setAllowCookies(data->m_allowCookies); | 47 request->setAllowCookies(data->m_allowCookies); |
| 48 request->setReportUploadProgress(data->m_reportUploadProgress); |
48 request->setHasUserGesture(data->m_hasUserGesture); | 49 request->setHasUserGesture(data->m_hasUserGesture); |
49 request->setDownloadToFile(data->m_downloadToFile); | 50 request->setDownloadToFile(data->m_downloadToFile); |
50 request->setRequestorID(data->m_requestorID); | 51 request->setRequestorID(data->m_requestorID); |
51 request->setRequestorProcessID(data->m_requestorProcessID); | 52 request->setRequestorProcessID(data->m_requestorProcessID); |
52 request->setAppCacheHostID(data->m_appCacheHostID); | 53 request->setAppCacheHostID(data->m_appCacheHostID); |
53 request->setTargetType(data->m_targetType); | 54 request->setTargetType(data->m_targetType); |
54 return request.release(); | 55 return request.release(); |
55 } | 56 } |
56 | 57 |
57 PassOwnPtr<CrossThreadResourceRequestData> ResourceRequest::copyData() const | 58 PassOwnPtr<CrossThreadResourceRequestData> ResourceRequest::copyData() const |
58 { | 59 { |
59 OwnPtr<CrossThreadResourceRequestData> data = adoptPtr(new CrossThreadResour
ceRequestData()); | 60 OwnPtr<CrossThreadResourceRequestData> data = adoptPtr(new CrossThreadResour
ceRequestData()); |
60 data->m_url = url().copy(); | 61 data->m_url = url().copy(); |
61 data->m_cachePolicy = cachePolicy(); | 62 data->m_cachePolicy = cachePolicy(); |
62 data->m_timeoutInterval = timeoutInterval(); | 63 data->m_timeoutInterval = timeoutInterval(); |
63 data->m_firstPartyForCookies = firstPartyForCookies().copy(); | 64 data->m_firstPartyForCookies = firstPartyForCookies().copy(); |
64 data->m_httpMethod = httpMethod().isolatedCopy(); | 65 data->m_httpMethod = httpMethod().isolatedCopy(); |
65 data->m_httpHeaders = httpHeaderFields().copyData(); | 66 data->m_httpHeaders = httpHeaderFields().copyData(); |
66 data->m_priority = priority(); | 67 data->m_priority = priority(); |
67 | 68 |
68 if (m_httpBody) | 69 if (m_httpBody) |
69 data->m_httpBody = m_httpBody->deepCopy(); | 70 data->m_httpBody = m_httpBody->deepCopy(); |
70 data->m_allowCookies = m_allowCookies; | 71 data->m_allowCookies = m_allowCookies; |
| 72 data->m_reportUploadProgress = m_reportUploadProgress; |
71 data->m_hasUserGesture = m_hasUserGesture; | 73 data->m_hasUserGesture = m_hasUserGesture; |
72 data->m_downloadToFile = m_downloadToFile; | 74 data->m_downloadToFile = m_downloadToFile; |
73 data->m_requestorID = m_requestorID; | 75 data->m_requestorID = m_requestorID; |
74 data->m_requestorProcessID = m_requestorProcessID; | 76 data->m_requestorProcessID = m_requestorProcessID; |
75 data->m_appCacheHostID = m_appCacheHostID; | 77 data->m_appCacheHostID = m_appCacheHostID; |
76 data->m_targetType = m_targetType; | 78 data->m_targetType = m_targetType; |
77 return data.release(); | 79 return data.release(); |
78 } | 80 } |
79 | 81 |
80 bool ResourceRequest::isEmpty() const | 82 bool ResourceRequest::isEmpty() const |
(...skipping 258 matching lines...) Loading... |
339 // This is used by the loader to control the number of issued parallel load requ
ests. | 341 // This is used by the loader to control the number of issued parallel load requ
ests. |
340 unsigned initializeMaximumHTTPConnectionCountPerHost() | 342 unsigned initializeMaximumHTTPConnectionCountPerHost() |
341 { | 343 { |
342 // The chromium network stack already handles limiting the number of | 344 // The chromium network stack already handles limiting the number of |
343 // parallel requests per host, so there's no need to do it here. Therefore, | 345 // parallel requests per host, so there's no need to do it here. Therefore, |
344 // this is set to a high value that should never be hit in practice. | 346 // this is set to a high value that should never be hit in practice. |
345 return 10000; | 347 return 10000; |
346 } | 348 } |
347 | 349 |
348 } | 350 } |
OLD | NEW |