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

Side by Side Diff: Source/core/css/CSSFontFaceSrcValue.cpp

Issue 1299493003: Attach mixed content status to resource requests when sent to devtools (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: isMixedContent() -> ContextTypeNotMixedContent, and rename devtools protocol enum Created 5 years, 4 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) 2007, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 void CSSFontFaceSrcValue::restoreCachedResourceIfNeeded(Document* document) 103 void CSSFontFaceSrcValue::restoreCachedResourceIfNeeded(Document* document)
104 { 104 {
105 ASSERT(m_fetched); 105 ASSERT(m_fetched);
106 ASSERT(document && document->fetcher()); 106 ASSERT(document && document->fetcher());
107 107
108 const String resourceURL = document->completeURL(m_resource); 108 const String resourceURL = document->completeURL(m_resource);
109 if (document->fetcher()->cachedResource(KURL(ParsedURLString, resourceURL))) 109 if (document->fetcher()->cachedResource(KURL(ParsedURLString, resourceURL)))
110 return; 110 return;
111 111
112 const ResourceRequest& lastResourceRequest = m_fetched->lastResourceRequest( );
112 FetchRequest request(ResourceRequest(resourceURL), FetchInitiatorTypeNames:: css); 113 FetchRequest request(ResourceRequest(resourceURL), FetchInitiatorTypeNames:: css);
113 request.setContentSecurityCheck(m_shouldCheckContentSecurityPolicy); 114 request.setContentSecurityCheck(m_shouldCheckContentSecurityPolicy);
114 MixedContentChecker::shouldBlockFetch(document->frame(), m_fetched->lastReso urceRequest(), 115 MixedContentChecker::shouldBlockFetch(document->frame(), lastResourceRequest .requestContext(), lastResourceRequest.frameType(),
115 m_fetched->lastResourceRequest().url(), MixedContentChecker::SendReport) ; 116 lastResourceRequest.url(), MixedContentChecker::SendReport);
116 document->fetcher()->requestLoadStarted(m_fetched.get(), request, ResourceFe tcher::ResourceLoadingFromCache); 117 document->fetcher()->requestLoadStarted(m_fetched.get(), request, ResourceFe tcher::ResourceLoadingFromCache);
117 } 118 }
118 119
119 bool CSSFontFaceSrcValue::equals(const CSSFontFaceSrcValue& other) const 120 bool CSSFontFaceSrcValue::equals(const CSSFontFaceSrcValue& other) const
120 { 121 {
121 return m_isLocal == other.m_isLocal && m_format == other.m_format && m_resou rce == other.m_resource; 122 return m_isLocal == other.m_isLocal && m_format == other.m_format && m_resou rce == other.m_resource;
122 } 123 }
123 124
124 } 125 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698