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

Unified Diff: third_party/WebKit/Source/core/fetch/ImageResource.cpp

Issue 1839473002: Centralize the setting of Accept headers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again Created 4 years, 8 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
Index: third_party/WebKit/Source/core/fetch/ImageResource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.cpp b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
index 0b1d2130534cb19acc0d45cbdc75054ac3e40ef6..7226477e2a8edc42933f181fae2e73f8ff9ef062 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
@@ -65,7 +65,6 @@ ImageResource::ImageResource(const ResourceRequest& resourceRequest, const Resou
, m_hasDevicePixelRatioHeaderValue(false)
{
WTF_LOG(Timers, "new ImageResource(ResourceRequest) %p", this);
- setCustomAcceptHeader();
}
ImageResource::ImageResource(blink::Image* image, const ResourceLoaderOptions& options)
@@ -76,7 +75,6 @@ ImageResource::ImageResource(blink::Image* image, const ResourceLoaderOptions& o
{
WTF_LOG(Timers, "new ImageResource(Image) %p", this);
setStatus(Cached);
- setCustomAcceptHeader();
}
ImageResource::ImageResource(const ResourceRequest& resourceRequest, blink::Image* image, const ResourceLoaderOptions& options)
@@ -85,7 +83,6 @@ ImageResource::ImageResource(const ResourceRequest& resourceRequest, blink::Imag
{
WTF_LOG(Timers, "new ImageResource(ResourceRequest, Image) %p", this);
setStatus(Cached);
- setCustomAcceptHeader();
}
ImageResource::~ImageResource()
@@ -313,12 +310,6 @@ void ImageResource::clear()
setEncodedSize(0);
}
-void ImageResource::setCustomAcceptHeader()
-{
- DEFINE_STATIC_LOCAL(const AtomicString, acceptImages, ("image/webp,image/*,*/*;q=0.8"));
- setAccept(acceptImages);
-}
-
inline void ImageResource::createImage()
{
// Create the image if it doesn't yet exist.
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ImageResource.h ('k') | third_party/WebKit/Source/core/fetch/Resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698