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

Unified Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc

Issue 2966923002: Allow chrome-proxy-content-transform:identity as legal response header (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc
index fe139ab1121e5d3cc1ebfcf990d717e82a748317..eb75b49b502021f54176df6687fad0b55ab0530d 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc
@@ -43,6 +43,7 @@ const char kActionValueDelimiter = '=';
const char kEmptyImageDirective[] = "empty-image";
const char kLitePageDirective[] = "lite-page";
const char kCompressedVideoDirective[] = "compressed-video";
+const char kIdentityDirective[] = "identity";
const char kChromeProxyPagePoliciesDirective[] = "page-policies";
// The legacy Chrome-Proxy response header directive for LoFi images.
@@ -233,6 +234,10 @@ TransformDirective ParseResponseTransform(
} else if (base::LowerCaseEqualsASCII(content_transform_value,
empty_image_directive())) {
return TRANSFORM_EMPTY_IMAGE;
+ } else if (base::LowerCaseEqualsASCII(content_transform_value,
+ kIdentityDirective)) {
+ // Open Original Image - not really a transform.
+ return TRANSFORM_NONE;
} else {
NOTREACHED() << "Unexpected content transform header: "
<< content_transform_value;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698