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

Side by Side Diff: third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
6 Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. 6 Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 CSSStyleSheetResource* CSSStyleSheetResource::createForTest(const ResourceReques t& request, const String& charset) 47 CSSStyleSheetResource* CSSStyleSheetResource::createForTest(const ResourceReques t& request, const String& charset)
48 { 48 {
49 return new CSSStyleSheetResource(request, ResourceLoaderOptions(), charset); 49 return new CSSStyleSheetResource(request, ResourceLoaderOptions(), charset);
50 } 50 }
51 51
52 CSSStyleSheetResource::CSSStyleSheetResource(const ResourceRequest& resourceRequ est, const ResourceLoaderOptions& options, const String& charset) 52 CSSStyleSheetResource::CSSStyleSheetResource(const ResourceRequest& resourceRequ est, const ResourceLoaderOptions& options, const String& charset)
53 : StyleSheetResource(resourceRequest, CSSStyleSheet, options, "text/css", ch arset) 53 : StyleSheetResource(resourceRequest, CSSStyleSheet, options, "text/css", ch arset)
54 { 54 {
55 DEFINE_STATIC_LOCAL(const AtomicString, acceptCSS, ("text/css,*/*;q=0.1"));
56
57 // Prefer text/css but accept any type (dell.com serves a stylesheet
58 // as text/html; see <http://bugs.webkit.org/show_bug.cgi?id=11451>).
59 setAccept(acceptCSS);
60 } 55 }
61 56
62 CSSStyleSheetResource::~CSSStyleSheetResource() 57 CSSStyleSheetResource::~CSSStyleSheetResource()
63 { 58 {
64 } 59 }
65 60
66 void CSSStyleSheetResource::removedFromMemoryCache() 61 void CSSStyleSheetResource::removedFromMemoryCache()
67 { 62 {
68 if (m_parsedStyleSheetCache) 63 if (m_parsedStyleSheetCache)
69 m_parsedStyleSheetCache->removedFromMemoryCache(); 64 m_parsedStyleSheetCache->removedFromMemoryCache();
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 177
183 setDecodedSize(m_parsedStyleSheetCache->estimatedSizeInBytes()); 178 setDecodedSize(m_parsedStyleSheetCache->estimatedSizeInBytes());
184 179
185 // Check if this stylesheet resource didn't conflict with 180 // Check if this stylesheet resource didn't conflict with
186 // another resource and has indeed been added to the cache. 181 // another resource and has indeed been added to the cache.
187 if (memoryCache()->contains(this)) 182 if (memoryCache()->contains(this))
188 m_parsedStyleSheetCache->addedToMemoryCache(); 183 m_parsedStyleSheetCache->addedToMemoryCache();
189 } 184 }
190 185
191 } // namespace blink 186 } // namespace blink
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/Source/core/fetch/ImageResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698