Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Side by Side Diff: Source/core/fetch/ResourceLoader.cpp

Issue 23632004: Add encoded_data_length argument to didDownloadData delegate method (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/fetch/ResourceLoader.h ('k') | Source/web/AssociatedURLLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/fetch/ResourceLoader.h ('k') | Source/web/AssociatedURLLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698