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

Unified Diff: webkit/child/resource_loader_bridge.h

Issue 23696002: Propagate the encoded data length through OnDownloadData delegate method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/pepper/pepper_url_loader_host.cc ('k') | webkit/child/weburlloader_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/child/resource_loader_bridge.h
diff --git a/webkit/child/resource_loader_bridge.h b/webkit/child/resource_loader_bridge.h
index 160bc846a594cd4225e9f0703ec48ecdde1e01ae..f1bedecb94d8907b1a595283f56f4900c355fe95 100644
--- a/webkit/child/resource_loader_bridge.h
+++ b/webkit/child/resource_loader_bridge.h
@@ -153,13 +153,18 @@ class ResourceLoaderBridge {
// called multiple times or not at all if an error occurs. This method is
// only called if RequestInfo::download_to_file was set to true, and in
// that case, OnReceivedData will not be called.
- virtual void OnDownloadedData(int len) = 0;
+ // The encoded_data_length is the length of the encoded data transferred
+ // over the network, which could be different from data length (e.g. for
+ // gzipped content), or -1 if unknown. It is only valid while devtools are
+ // attached. Otherwise it becomes -1.
+ virtual void OnDownloadedData(int len, int encoded_data_length) = 0;
// Called when a chunk of response data is available. This method may
// be called multiple times or not at all if an error occurs.
// The encoded_data_length is the length of the encoded data transferred
// over the network, which could be different from data length (e.g. for
- // gzipped content), or -1 if if unknown.
+ // gzipped content), or -1 if unknown. It is only valid while devtools are
+ // attached. Otherwise it becomes -1.
virtual void OnReceivedData(const char* data,
int data_length,
int encoded_data_length) = 0;
« no previous file with comments | « content/renderer/pepper/pepper_url_loader_host.cc ('k') | webkit/child/weburlloader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698