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

Unified Diff: third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp

Issue 2533983003: Move hacks for Inspector in restoreCachedResourceIfNeeded() to ResourceFetcher (Closed)
Patch Set: Rebase Created 4 years 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 | third_party/WebKit/Source/core/css/CSSImageValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp b/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp
index e5ec2f69019196cd13d9d2aeb3ad28d7aa118edc..d098c355c285681c5330161c337e727700fe94d0 100644
--- a/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp
@@ -32,7 +32,6 @@
#include "core/fetch/FetchInitiatorTypeNames.h"
#include "core/fetch/FetchRequest.h"
#include "core/fetch/ResourceFetcher.h"
-#include "core/loader/MixedContentChecker.h"
#include "core/loader/resource/FontResource.h"
#include "platform/CrossOriginAttributeValue.h"
#include "platform/fonts/FontCache.h"
@@ -115,21 +114,11 @@ void CSSFontFaceSrcValue::restoreCachedResourceIfNeeded(
ASSERT(document && document->fetcher());
const String resourceURL = document->completeURL(m_absoluteResource);
- if (document->fetcher()->cachedResource(KURL(ParsedURLString, resourceURL)))
- return;
-
- FetchRequest request(ResourceRequest(resourceURL),
- FetchInitiatorTypeNames::css);
- request.setContentSecurityCheck(m_shouldCheckContentSecurityPolicy);
- request.mutableResourceRequest().setRequestContext(
- WebURLRequest::RequestContextFont);
- MixedContentChecker::shouldBlockFetch(
- document->frame(), m_fetched->resource()->lastResourceRequest(),
- m_fetched->resource()->lastResourceRequest().url(),
- MixedContentChecker::SendReport);
- document->fetcher()->requestLoadStarted(
- m_fetched->resource()->identifier(), m_fetched->resource(), request,
- ResourceFetcher::ResourceLoadingFromCache);
+ DCHECK_EQ(m_shouldCheckContentSecurityPolicy,
+ m_fetched->resource()->options().contentSecurityPolicyOption);
+ document->fetcher()->emulateLoadStartedForInspector(
+ m_fetched->resource(), KURL(ParsedURLString, resourceURL),
+ WebURLRequest::RequestContextFont, FetchInitiatorTypeNames::css);
}
bool CSSFontFaceSrcValue::equals(const CSSFontFaceSrcValue& other) const {
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSImageValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698