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

Issue 295041: DevTools: report correct content length for resources (Closed)

Created:
11 years, 2 months ago by yurys
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, darin (slow to review), ben+cc_chromium.org, pam+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

DevTools: report correct content length for resources. Currently lengthReceived always has the same value as dataLength when Safari calls ResourceHandle::didReceiveData. In Chrome expected content length is passed as lengthReceived parameter which leads to incorrect content length to be stored in InspectorResource. InspectorResource expects lengthReceived to be the length of current data chunk(see InspectorResource::addLength). So I changed lengthReceived parameter to be dataLength. Darin, I see your TODO comment at line 581 in http://src.chromium.org/viewvc/chrome/trunk/src/webkit/glue/weburlloader_impl.cc?annotate=6296 (the comment was deleted later) so I think you are right person to review the change in weburlloader_impl.cc. Please look at weburlloader_impl.cc and feel free to leave devtools specific changes to Alex and Pavel. BUG=25213 TEST=DevToolsSanityTest.TestResourceContentLength Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=30725

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2

Patch Set 3 : '' #

Total comments: 2

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -35 lines) Patch
M chrome/browser/debugger/devtools_sanity_unittest.cc View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
A chrome/test/data/devtools/image.html View 1 1 chunk +7 lines, -0 lines 0 comments Download
A chrome/test/data/devtools/image.png View 1 Binary file 0 comments Download
M webkit/api/public/WebURLLoaderClient.h View 3 1 chunk +1 line, -1 line 0 comments Download
M webkit/api/src/ResourceHandle.cpp View 3 2 chunks +6 lines, -9 lines 0 comments Download
M webkit/glue/devtools/js/tests.js View 1 2 3 1 chunk +57 lines, -0 lines 0 comments Download
M webkit/glue/ftp_directory_listing_response_delegate.cc View 3 1 chunk +1 line, -1 line 0 comments Download
M webkit/glue/multipart_response_delegate.cc View 3 3 chunks +2 lines, -11 lines 0 comments Download
M webkit/glue/multipart_response_delegate_unittest.cc View 3 1 chunk +1 line, -2 lines 0 comments Download
M webkit/glue/resource_fetcher.h View 3 1 chunk +1 line, -2 lines 0 comments Download
M webkit/glue/resource_fetcher.cc View 3 1 chunk +1 line, -2 lines 0 comments Download
M webkit/glue/webplugin_impl.h View 3 1 chunk +1 line, -1 line 0 comments Download
M webkit/glue/webplugin_impl.cc View 3 2 chunks +2 lines, -2 lines 0 comments Download
M webkit/glue/weburlloader_impl.cc View 1 2 3 3 chunks +1 line, -4 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
yurys
11 years, 2 months ago (2009-10-21 15:31:31 UTC) #1
darin (slow to review)
http://codereview.chromium.org/295041/diff/2001/3001 File webkit/glue/weburlloader_impl.cc (right): http://codereview.chromium.org/295041/diff/2001/3001#newcode475 Line 475: client_->didReceiveData(loader_, data, len, len); please also change WebURLLoaderClient ...
11 years, 1 month ago (2009-10-27 16:10:49 UTC) #2
yurys
http://codereview.chromium.org/295041/diff/2001/3001 File webkit/glue/weburlloader_impl.cc (right): http://codereview.chromium.org/295041/diff/2001/3001#newcode475 Line 475: client_->didReceiveData(loader_, data, len, len); On 2009/10/27 16:10:49, darin ...
11 years, 1 month ago (2009-10-28 12:05:52 UTC) #3
darin (slow to review)
LGTM http://codereview.chromium.org/295041/diff/6001/6005 File webkit/api/src/ResourceHandle.cpp (right): http://codereview.chromium.org/295041/diff/6001/6005#newcode138 Line 138: // TODO(yurys): it looks like lengthReceived is ...
11 years, 1 month ago (2009-11-02 17:49:39 UTC) #4
yurys
11 years, 1 month ago (2009-11-02 18:37:43 UTC) #5
http://codereview.chromium.org/295041/diff/6001/6005
File webkit/api/src/ResourceHandle.cpp (right):

http://codereview.chromium.org/295041/diff/6001/6005#newcode138
Line 138: // TODO(yurys): it looks like lengthReceived is always the same as
On 2009/11/02 17:49:39, darin wrote:
> This should be a FIXME per webkit style.  Can you please file a webkit bug
about
> this issue.

Done. Filed a WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=31019

Powered by Google App Engine
This is Rietveld 408576698