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 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 auto_ptr<CrossThreadResourceRequestData> ResourceRequestBase::copyData() const | 69 auto_ptr<CrossThreadResourceRequestData> ResourceRequestBase::copyData() const |
70 { | 70 { |
71 auto_ptr<CrossThreadResourceRequestData> data(new CrossThreadResourceRequest
Data()); | 71 auto_ptr<CrossThreadResourceRequestData> data(new CrossThreadResourceRequest
Data()); |
72 data->m_url = url().copy(); | 72 data->m_url = url().copy(); |
73 data->m_cachePolicy = cachePolicy(); | 73 data->m_cachePolicy = cachePolicy(); |
74 data->m_timeoutInterval = timeoutInterval(); | 74 data->m_timeoutInterval = timeoutInterval(); |
75 data->m_mainDocumentURL = mainDocumentURL().copy(); | 75 data->m_mainDocumentURL = mainDocumentURL().copy(); |
76 data->m_httpMethod = httpMethod().copy(); | 76 data->m_httpMethod = httpMethod().copy(); |
77 data->m_httpHeaders.adopt(httpHeaderFields().copyData()); | 77 data->m_httpHeaders.adopt(httpHeaderFields().copyData()); |
78 | 78 |
79 data->m_responseContentDispositionEncodingFallbackArray.reserveCapacity(m_re
sponseContentDispositionEncodingFallbackArray.size()); | 79 data->m_responseContentDispositionEncodingFallbackArray.reserveInitialCapaci
ty(m_responseContentDispositionEncodingFallbackArray.size()); |
80 size_t encodingArraySize = m_responseContentDispositionEncodingFallbackArray
.size(); | 80 size_t encodingArraySize = m_responseContentDispositionEncodingFallbackArray
.size(); |
81 for (size_t index = 0; index < encodingArraySize; ++index) { | 81 for (size_t index = 0; index < encodingArraySize; ++index) { |
82 data->m_responseContentDispositionEncodingFallbackArray.append(m_respons
eContentDispositionEncodingFallbackArray[index].copy()); | 82 data->m_responseContentDispositionEncodingFallbackArray.append(m_respons
eContentDispositionEncodingFallbackArray[index].copy()); |
83 } | 83 } |
84 if (m_httpBody) | 84 if (m_httpBody) |
85 data->m_httpBody = m_httpBody->deepCopy(); | 85 data->m_httpBody = m_httpBody->deepCopy(); |
86 data->m_allowHTTPCookies = m_allowHTTPCookies; | 86 data->m_allowHTTPCookies = m_allowHTTPCookies; |
87 return data; | 87 return data; |
88 } | 88 } |
89 | 89 |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 void ResourceRequestBase::updateResourceRequest() const | 332 void ResourceRequestBase::updateResourceRequest() const |
333 { | 333 { |
334 if (m_resourceRequestUpdated) | 334 if (m_resourceRequestUpdated) |
335 return; | 335 return; |
336 | 336 |
337 const_cast<ResourceRequest&>(asResourceRequest()).doUpdateResourceRequest(); | 337 const_cast<ResourceRequest&>(asResourceRequest()).doUpdateResourceRequest(); |
338 m_resourceRequestUpdated = true; | 338 m_resourceRequestUpdated = true; |
339 } | 339 } |
340 | 340 |
341 } | 341 } |
OLD | NEW |