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

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

Issue 14793022: Revert 150055 "Consider "mixed content XHR" as mixed script inst..." (Closed) Base URL: svn://svn.chromium.org/blink/
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 | « trunk/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:
237 // These resource can inject script into the current document (Script, 236 // These resource can inject script into the current document (Script,
238 // XSL) or exfiltrate the content of the current document (CSS). 237 // XSL) or exfiltrate the content of the current document (CSS).
239 if (Frame* f = frame()) 238 if (Frame* f = frame())
240 if (!f->loader()->mixedContentChecker()->canRunInsecureContent(m_doc ument->securityOrigin(), url)) 239 if (!f->loader()->mixedContentChecker()->canRunInsecureContent(m_doc ument->securityOrigin(), url))
241 return false; 240 return false;
242 break; 241 break;
243 case CachedResource::TextTrackResource: 242 case CachedResource::TextTrackResource:
244 case CachedResource::ShaderResource: 243 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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 info.ignoreMember(m_initiatorMap); 1012 info.ignoreMember(m_initiatorMap);
1013 } 1013 }
1014 1014
1015 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions( ) 1015 const ResourceLoaderOptions& CachedResourceLoader::defaultCachedResourceOptions( )
1016 { 1016 {
1017 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData , AllowStoredCredentials, ClientRequestedCredentials, AskClientForCrossOriginCre dentials, DoSecurityCheck); 1017 static ResourceLoaderOptions options(SendCallbacks, SniffContent, BufferData , AllowStoredCredentials, ClientRequestedCredentials, AskClientForCrossOriginCre dentials, DoSecurityCheck);
1018 return options; 1018 return options;
1019 } 1019 }
1020 1020
1021 } 1021 }
OLDNEW
« no previous file with comments | « trunk/Source/core/loader/DocumentThreadableLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698