summaryrefslogtreecommitdiffstats
path: root/webkit/glue/resource_loader_bridge.h
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/resource_loader_bridge.h')
-rw-r--r--webkit/glue/resource_loader_bridge.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/webkit/glue/resource_loader_bridge.h b/webkit/glue/resource_loader_bridge.h
index 3519269..e1a5a99 100644
--- a/webkit/glue/resource_loader_bridge.h
+++ b/webkit/glue/resource_loader_bridge.h
@@ -25,9 +25,9 @@
#include "base/file_descriptor_posix.h"
#endif
#include "base/file_path.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/platform_file.h"
-#include "base/ref_counted.h"
-#include "base/scoped_ptr.h"
#include "base/time.h"
#include "base/values.h"
#include "googleurl/src/gurl.h"
@@ -141,6 +141,10 @@ struct ResourceResponseInfo {
// Content length if available. -1 if not available
int64 content_length;
+ // Length of the encoded data transferred over the network. In case there is
+ // no data, contains -1.
+ int64 encoded_data_length;
+
// The appcache this response was loaded from, or kNoCacheId.
int64 appcache_id;
@@ -301,7 +305,12 @@ class ResourceLoaderBridge {
// Called when a chunk of response data is available. This method may
// be called multiple times or not at all if an error occurs.
- virtual void OnReceivedData(const char* data, 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 if unknown.
+ virtual void OnReceivedData(const char* data,
+ int data_length,
+ int encoded_data_length) = 0;
// Called when metadata generated by the renderer is retrieved from the
// cache. This method may be called zero or one times.