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

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: incorporated review comments Created 6 years, 10 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
« no previous file with comments | « Source/bindings/v8/ScriptController.cpp ('k') | Source/core/frame/FrameView.cpp » ('j') | 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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS ecurityPolicy()->allowScriptFromSource(url)) 499 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS ecurityPolicy()->allowScriptFromSource(url))
500 return false; 500 return false;
501 break; 501 break;
502 case Resource::Script: 502 case Resource::Script:
503 case Resource::ImportResource: 503 case Resource::ImportResource:
504 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS ecurityPolicy()->allowScriptFromSource(url)) 504 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS ecurityPolicy()->allowScriptFromSource(url))
505 return false; 505 return false;
506 506
507 if (frame()) { 507 if (frame()) {
508 Settings* settings = frame()->settings(); 508 Settings* settings = frame()->settings();
509 if (!frame()->loader().client()->allowScriptFromSource(!settings || settings->isScriptEnabled(), url)) { 509 if (!frame()->loader().client()->allowScriptFromSource(!settings || settings->scriptEnabled(), url)) {
510 frame()->loader().client()->didNotAllowScript(); 510 frame()->loader().client()->didNotAllowScript();
511 return false; 511 return false;
512 } 512 }
513 } 513 }
514 break; 514 break;
515 case Resource::Shader: 515 case Resource::Shader:
516 // Since shaders are referenced from CSS Styles use the same rules here. 516 // Since shaders are referenced from CSS Styles use the same rules here.
517 case Resource::CSSStyleSheet: 517 case Resource::CSSStyleSheet:
518 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS ecurityPolicy()->allowStyleFromSource(url)) 518 if (!shouldBypassMainWorldContentSecurityPolicy && !m_document->contentS ecurityPolicy()->allowStyleFromSource(url))
519 return false; 519 return false;
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 case Revalidate: 1407 case Revalidate:
1408 ++m_revalidateCount; 1408 ++m_revalidateCount;
1409 return; 1409 return;
1410 case Use: 1410 case Use:
1411 ++m_useCount; 1411 ++m_useCount;
1412 return; 1412 return;
1413 } 1413 }
1414 } 1414 }
1415 1415
1416 } 1416 }
OLDNEW
« no previous file with comments | « Source/bindings/v8/ScriptController.cpp ('k') | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698