OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. |
3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) | 3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) |
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 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 m_defersLoading = defers; | 155 m_defersLoading = defers; |
156 if (m_loader) | 156 if (m_loader) |
157 m_loader->setDefersLoading(defers); | 157 m_loader->setDefersLoading(defers); |
158 if (!defers && !m_deferredRequest.isNull()) { | 158 if (!defers && !m_deferredRequest.isNull()) { |
159 m_request = m_deferredRequest; | 159 m_request = m_deferredRequest; |
160 m_deferredRequest = ResourceRequest(); | 160 m_deferredRequest = ResourceRequest(); |
161 start(); | 161 start(); |
162 } | 162 } |
163 } | 163 } |
164 | 164 |
165 void ResourceLoader::didDownloadData(WebKit::WebURLLoader*, int length) | 165 void ResourceLoader::didDownloadData(WebKit::WebURLLoader*, int length, int enco
dedDataLength) |
166 { | 166 { |
167 RefPtr<ResourceLoader> protect(this); | 167 RefPtr<ResourceLoader> protect(this); |
168 RELEASE_ASSERT(m_connectionState == ConnectionStateReceivedResponse); | 168 RELEASE_ASSERT(m_connectionState == ConnectionStateReceivedResponse); |
169 m_resource->didDownloadData(length); | 169 m_resource->didDownloadData(length); |
170 } | 170 } |
171 | 171 |
172 void ResourceLoader::didFinishLoadingOnePart(double finishTime) | 172 void ResourceLoader::didFinishLoadingOnePart(double finishTime) |
173 { | 173 { |
174 // If load has been cancelled after finishing (which could happen with a | 174 // If load has been cancelled after finishing (which could happen with a |
175 // JavaScript that changes the window location), do nothing. | 175 // JavaScript that changes the window location), do nothing. |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 loader->loadSynchronously(requestIn, responseOut, errorOut, dataOut); | 402 loader->loadSynchronously(requestIn, responseOut, errorOut, dataOut); |
403 | 403 |
404 error = errorOut; | 404 error = errorOut; |
405 data.clear(); | 405 data.clear(); |
406 RefPtr<SharedBuffer> buffer = dataOut; | 406 RefPtr<SharedBuffer> buffer = dataOut; |
407 if (buffer) | 407 if (buffer) |
408 buffer->moveTo(data); | 408 buffer->moveTo(data); |
409 } | 409 } |
410 | 410 |
411 } | 411 } |
OLD | NEW |