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

Side by Side Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 146683003: Settings should not call into inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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) 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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS ecurityPolicy()->allowScriptFromSource(url)) 493 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS ecurityPolicy()->allowScriptFromSource(url))
494 return false; 494 return false;
495 break; 495 break;
496 case Resource::Script: 496 case Resource::Script:
497 case Resource::ImportResource: 497 case Resource::ImportResource:
498 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS ecurityPolicy()->allowScriptFromSource(url)) 498 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS ecurityPolicy()->allowScriptFromSource(url))
499 return false; 499 return false;
500 500
501 if (frame()) { 501 if (frame()) {
502 Settings* settings = frame()->settings(); 502 Settings* settings = frame()->settings();
503 if (!frame()->loader().client()->allowScriptFromSource(!settings || settings->isScriptEnabled(), url)) { 503 if (!frame()->loader().client()->allowScriptFromSource(!settings || settings->scriptEnabled(), url)) {
504 frame()->loader().client()->didNotAllowScript(); 504 frame()->loader().client()->didNotAllowScript();
505 return false; 505 return false;
506 } 506 }
507 } 507 }
508 break; 508 break;
509 case Resource::Shader: 509 case Resource::Shader:
510 // Since shaders are referenced from CSS Styles use the same rules here. 510 // Since shaders are referenced from CSS Styles use the same rules here.
511 case Resource::CSSStyleSheet: 511 case Resource::CSSStyleSheet:
512 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS ecurityPolicy()->allowStyleFromSource(url)) 512 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS ecurityPolicy()->allowStyleFromSource(url))
513 return false; 513 return false;
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 } 1347 }
1348 #endif 1348 #endif
1349 1349
1350 const ResourceLoaderOptions& ResourceFetcher::defaultResourceOptions() 1350 const ResourceLoaderOptions& ResourceFetcher::defaultResourceOptions()
1351 { 1351 {
1352 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, options, (SniffContent, BufferDat a, AllowStoredCredentials, ClientRequestedCredentials, AskClientForCrossOriginCr edentials, DoSecurityCheck, CheckContentSecurityPolicy, DocumentContext)); 1352 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, options, (SniffContent, BufferDat a, AllowStoredCredentials, ClientRequestedCredentials, AskClientForCrossOriginCr edentials, DoSecurityCheck, CheckContentSecurityPolicy, DocumentContext));
1353 return options; 1353 return options;
1354 } 1354 }
1355 1355
1356 } 1356 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698