Request uncompressed images from data reduction proxy when saving.
When user saves an image, add headers requesting a pass through
from the data reduction proxy. Without this, images will be
saved in webp format which is not supported by most image viewers.
BUG=464436
Review URL: https://codereview.chromium.org/988453002
Cr-Commit-Position: refs/heads/master@{#319681}
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index cdb7de0e..abdda45 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -474,10 +474,18 @@
const base::FilePath& dir_path,
SavePageType save_type) = 0;
- // Saves the given frame's URL to the local filesystem..
+ // Saves the given frame's URL to the local filesystem.
virtual void SaveFrame(const GURL& url,
const Referrer& referrer) = 0;
+ // Saves the given frame's URL to the local filesystem. The headers, if
+ // provided, is used to make a request to the URL rather than using cache.
+ // Format of |headers| is a new line separated list of key value pairs:
+ // "<key1>: <value1>\n<key2>: <value2>".
+ virtual void SaveFrameWithHeaders(const GURL& url,
+ const Referrer& referrer,
+ const std::string& headers) = 0;
+
// Generate an MHTML representation of the current page in the given file.
virtual void GenerateMHTML(
const base::FilePath& file,