| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, int enco
dedDataLength) | 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_host->didDownloadData(m_resource, length, encodedDataLength, m_options); |
| 169 m_resource->didDownloadData(length); | 170 m_resource->didDownloadData(length); |
| 170 } | 171 } |
| 171 | 172 |
| 172 void ResourceLoader::didFinishLoadingOnePart(double finishTime) | 173 void ResourceLoader::didFinishLoadingOnePart(double finishTime) |
| 173 { | 174 { |
| 174 // If load has been cancelled after finishing (which could happen with a | 175 // If load has been cancelled after finishing (which could happen with a |
| 175 // JavaScript that changes the window location), do nothing. | 176 // JavaScript that changes the window location), do nothing. |
| 176 if (m_state == Terminated) | 177 if (m_state == Terminated) |
| 177 return; | 178 return; |
| 178 | 179 |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 loader->loadSynchronously(requestIn, responseOut, errorOut, dataOut); | 403 loader->loadSynchronously(requestIn, responseOut, errorOut, dataOut); |
| 403 | 404 |
| 404 error = errorOut; | 405 error = errorOut; |
| 405 data.clear(); | 406 data.clear(); |
| 406 RefPtr<SharedBuffer> buffer = dataOut; | 407 RefPtr<SharedBuffer> buffer = dataOut; |
| 407 if (buffer) | 408 if (buffer) |
| 408 buffer->moveTo(data); | 409 buffer->moveTo(data); |
| 409 } | 410 } |
| 410 | 411 |
| 411 } | 412 } |
| OLD | NEW |