Report Data Savings of Placeholders [LoFi, Lazy Load]
Currently client LoFi and Lazy Load do not report data savings (after
network service is turned on). This CL adds support for when a
placeholder image is loaded and possible fully loaded in. When a
placeholder image is loaded the delta between image size and placeholder
size (range header) is counted as savings. If the full image is loaded
in, the savings is considered negative because of the extra request.
This CL adds some previews state plumbing and adds a new previews state
for when a Lazy Loaded image moves from placeholder to full image.
Bug: 943750
Change-Id: I1d8a5c55d2c7fcd8857662a7badf6ee798dc9959
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1529865
Commit-Queue: Ryan Sturm <[email protected]>
Reviewed-by: Yutaka Hirano <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Tarun Bansal <[email protected]>
Cr-Commit-Position: refs/heads/master@{#645007}
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 084a836..4d9a60a 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -979,7 +979,8 @@
void DidStartResponse(const GURL& response_url,
int request_id,
const network::ResourceResponseHead& response_head,
- content::ResourceType resource_type);
+ content::ResourceType resource_type,
+ PreviewsState previews_state);
void DidCompleteResponse(int request_id,
const network::URLLoaderCompletionStatus& status);
void DidCancelResponse(int request_id);