| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 105 |
| 106 void ResourceLoader::didDownloadData(WebURLLoader*, | 106 void ResourceLoader::didDownloadData(WebURLLoader*, |
| 107 int length, | 107 int length, |
| 108 int encodedDataLength) { | 108 int encodedDataLength) { |
| 109 m_fetcher->didDownloadData(m_resource.get(), length, encodedDataLength); | 109 m_fetcher->didDownloadData(m_resource.get(), length, encodedDataLength); |
| 110 m_resource->didDownloadData(length); | 110 m_resource->didDownloadData(length); |
| 111 } | 111 } |
| 112 | 112 |
| 113 void ResourceLoader::didChangePriority(ResourceLoadPriority loadPriority, | 113 void ResourceLoader::didChangePriority(ResourceLoadPriority loadPriority, |
| 114 int intraPriorityValue) { | 114 int intraPriorityValue) { |
| 115 if (m_loader) | 115 if (m_loader) { |
| 116 m_loader->didChangePriority( | 116 m_loader->didChangePriority( |
| 117 static_cast<WebURLRequest::Priority>(loadPriority), intraPriorityValue); | 117 static_cast<WebURLRequest::Priority>(loadPriority), intraPriorityValue); |
| 118 } |
| 118 } | 119 } |
| 119 | 120 |
| 120 void ResourceLoader::cancel() { | 121 void ResourceLoader::cancel() { |
| 121 didFail(nullptr, ResourceError::cancelledError( | 122 didFail(nullptr, ResourceError::cancelledError( |
| 122 m_resource->lastResourceRequest().url())); | 123 m_resource->lastResourceRequest().url())); |
| 123 } | 124 } |
| 124 | 125 |
| 125 void ResourceLoader::cancelForRedirectAccessCheckError(const KURL& newURL) { | 126 void ResourceLoader::cancelForRedirectAccessCheckError(const KURL& newURL) { |
| 126 m_resource->willNotFollowRedirect(); | 127 m_resource->willNotFollowRedirect(); |
| 127 | 128 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 // a 304, where it will overwrite the cached data we should be reusing. | 259 // a 304, where it will overwrite the cached data we should be reusing. |
| 259 if (dataOut.size()) { | 260 if (dataOut.size()) { |
| 260 m_fetcher->didReceiveData(m_resource.get(), dataOut.data(), dataOut.size(), | 261 m_fetcher->didReceiveData(m_resource.get(), dataOut.data(), dataOut.size(), |
| 261 encodedDataLength); | 262 encodedDataLength); |
| 262 m_resource->setResourceBuffer(dataOut); | 263 m_resource->setResourceBuffer(dataOut); |
| 263 } | 264 } |
| 264 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength); | 265 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength); |
| 265 } | 266 } |
| 266 | 267 |
| 267 } // namespace blink | 268 } // namespace blink |
| OLD | NEW |