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

Side by Side Diff: Source/core/loader/cache/CachedResourceLoader.cpp

Issue 14619021: Consider "mixed content XHR" as mixed script instead of mixed display. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/DocumentThreadableLoader.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 226
227 bool CachedResourceLoader::checkInsecureContent(CachedResource::Type type, const KURL& url) const 227 bool CachedResourceLoader::checkInsecureContent(CachedResource::Type type, const KURL& url) const
228 { 228 {
229 switch (type) { 229 switch (type) {
230 case CachedResource::Script: 230 case CachedResource::Script:
231 case CachedResource::XSLStyleSheet: 231 case CachedResource::XSLStyleSheet:
232 #if ENABLE(SVG) 232 #if ENABLE(SVG)
233 case CachedResource::SVGDocumentResource: 233 case CachedResource::SVGDocumentResource:
234 #endif 234 #endif
235 case CachedResource::CSSStyleSheet: 235 case CachedResource::CSSStyleSheet:
236 case CachedResource::RawResource:
236 // These resource can inject script into the current document (Script, 237 // These resource can inject script into the current document (Script,
237 // XSL) or exfiltrate the content of the current document (CSS). 238 // XSL) or exfiltrate the content of the current document (CSS).
238 if (Frame* f = frame()) 239 if (Frame* f = frame())
239 if (!f->loader()->mixedContentChecker()->canRunInsecureContent(m_doc ument->securityOrigin(), url)) 240 if (!f->loader()->mixedContentChecker()->canRunInsecureContent(m_doc ument->securityOrigin(), url))
240 return false; 241 return false;
241 break; 242 break;
242 case CachedResource::TextTrackResource: 243 case CachedResource::TextTrackResource:
243 case CachedResource::ShaderResource: 244 case CachedResource::ShaderResource:
244 case CachedResource::RawResource:
245 case CachedResource::ImageResource: 245 case CachedResource::ImageResource:
246 case CachedResource::FontResource: { 246 case CachedResource::FontResource: {
247 // These resources can corrupt only the frame's pixels. 247 // These resources can corrupt only the frame's pixels.
248 if (Frame* f = frame()) { 248 if (Frame* f = frame()) {
249 Frame* top = f->tree()->top(); 249 Frame* top = f->tree()->top();
250 if (!top->loader()->mixedContentChecker()->canDisplayInsecureContent (top->document()->securityOrigin(), url)) 250 if (!top->loader()->mixedContentChecker()->canDisplayInsecureContent (top->document()->securityOrigin(), url))
251 return false; 251 return false;
252 } 252 }
253 break; 253 break;
254 } 254 }
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 info.ignoreMember(m_initiatorMap); 1040 info.ignoreMember(m_initiatorMap);
1041 } 1041 }
1042 1042
1043 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions( ) 1043 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions( )
1044 { 1044 {
1045 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData , AllowStoredCredentials, AskClientForCrossOriginCredentials, DoSecurityCheck); 1045 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData , AllowStoredCredentials, AskClientForCrossOriginCredentials, DoSecurityCheck);
1046 return options; 1046 return options;
1047 } 1047 }
1048 1048
1049 } 1049 }
OLDNEW
« no previous file with comments | « Source/core/loader/DocumentThreadableLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698