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

Unified Diff: webkit/api/src/ResourceHandle.cpp

Issue 295041: DevTools: report correct content length for resources (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/api/public/WebURLLoaderClient.h ('k') | webkit/glue/devtools/js/tests.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/api/src/ResourceHandle.cpp
===================================================================
--- webkit/api/src/ResourceHandle.cpp (revision 30714)
+++ webkit/api/src/ResourceHandle.cpp (working copy)
@@ -69,8 +69,7 @@
virtual void didSendData(
WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent);
virtual void didReceiveResponse(WebURLLoader*, const WebURLResponse&);
- virtual void didReceiveData(
- WebURLLoader*, const char* data, int dataLength, long long totalDataLength);
+ virtual void didReceiveData(WebURLLoader*, const char* data, int dataLength);
virtual void didFinishLoading(WebURLLoader*);
virtual void didFail(WebURLLoader*, const WebURLError&);
@@ -132,16 +131,14 @@
}
void ResourceHandleInternal::didReceiveData(
- WebURLLoader*, const char* data, int dataLength, long long totalDataLength)
+ WebURLLoader*, const char* data, int dataLength)
{
ASSERT(m_client);
- // FIXME: ResourceHandleClient::didReceiveData should take a 'long long'
- int lengthReceived = static_cast<int>(totalDataLength);
- if (lengthReceived != totalDataLength) // overflow occurred
- lengthReceived = -1;
-
- m_client->didReceiveData(m_owner, data, dataLength, lengthReceived);
+ // FIXME(yurys): it looks like lengthReceived is always the same as
+ // dataLength and that the latter parameter can be eliminated.
+ // See WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=31019
+ m_client->didReceiveData(m_owner, data, dataLength, dataLength);
}
void ResourceHandleInternal::didFinishLoading(WebURLLoader*)
« no previous file with comments | « webkit/api/public/WebURLLoaderClient.h ('k') | webkit/glue/devtools/js/tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698