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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

Issue 2800853002: [instrumentation] Turn inspector override "probes" return values into output parameters. (Closed)
Patch Set: update BUILD.gn Created 3 years, 8 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 30 matching lines...) Expand all
41 #include "core/frame/FrameView.h" 41 #include "core/frame/FrameView.h"
42 #include "core/frame/LocalDOMWindow.h" 42 #include "core/frame/LocalDOMWindow.h"
43 #include "core/frame/LocalFrame.h" 43 #include "core/frame/LocalFrame.h"
44 #include "core/frame/LocalFrameClient.h" 44 #include "core/frame/LocalFrameClient.h"
45 #include "core/frame/Settings.h" 45 #include "core/frame/Settings.h"
46 #include "core/frame/UseCounter.h" 46 #include "core/frame/UseCounter.h"
47 #include "core/html/HTMLFrameOwnerElement.h" 47 #include "core/html/HTMLFrameOwnerElement.h"
48 #include "core/html/imports/HTMLImportsController.h" 48 #include "core/html/imports/HTMLImportsController.h"
49 #include "core/inspector/ConsoleMessage.h" 49 #include "core/inspector/ConsoleMessage.h"
50 #include "core/inspector/IdentifiersFactory.h" 50 #include "core/inspector/IdentifiersFactory.h"
51 #include "core/inspector/InspectorNetworkAgent.h"
52 #include "core/inspector/InspectorTraceEvents.h" 51 #include "core/inspector/InspectorTraceEvents.h"
53 #include "core/loader/DocumentLoader.h" 52 #include "core/loader/DocumentLoader.h"
54 #include "core/loader/FrameLoader.h" 53 #include "core/loader/FrameLoader.h"
55 #include "core/loader/MixedContentChecker.h" 54 #include "core/loader/MixedContentChecker.h"
56 #include "core/loader/NetworkHintsInterface.h" 55 #include "core/loader/NetworkHintsInterface.h"
57 #include "core/loader/PingLoader.h" 56 #include "core/loader/PingLoader.h"
58 #include "core/loader/ProgressTracker.h" 57 #include "core/loader/ProgressTracker.h"
59 #include "core/loader/SubresourceFilter.h" 58 #include "core/loader/SubresourceFilter.h"
60 #include "core/loader/appcache/ApplicationCacheHost.h" 59 #include "core/loader/appcache/ApplicationCacheHost.h"
61 #include "core/loader/private/FrameClientHintsPreferencesContext.h" 60 #include "core/loader/private/FrameClientHintsPreferencesContext.h"
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 } 716 }
718 717
719 ResourceRequestBlockedReason FrameFetchContext::canRequestInternal( 718 ResourceRequestBlockedReason FrameFetchContext::canRequestInternal(
720 Resource::Type type, 719 Resource::Type type,
721 const ResourceRequest& resourceRequest, 720 const ResourceRequest& resourceRequest,
722 const KURL& url, 721 const KURL& url,
723 const ResourceLoaderOptions& options, 722 const ResourceLoaderOptions& options,
724 SecurityViolationReportingPolicy reportingPolicy, 723 SecurityViolationReportingPolicy reportingPolicy,
725 FetchRequest::OriginRestriction originRestriction, 724 FetchRequest::OriginRestriction originRestriction,
726 ResourceRequest::RedirectStatus redirectStatus) const { 725 ResourceRequest::RedirectStatus redirectStatus) const {
727 if (probe::shouldBlockRequest(frame(), resourceRequest)) 726 bool shouldBlockRequest = false;
727 probe::shouldBlockRequest(frame(), resourceRequest, &shouldBlockRequest);
728 if (shouldBlockRequest)
728 return ResourceRequestBlockedReason::Inspector; 729 return ResourceRequestBlockedReason::Inspector;
729 730
730 SecurityOrigin* securityOrigin = options.securityOrigin.get(); 731 SecurityOrigin* securityOrigin = options.securityOrigin.get();
731 if (!securityOrigin && m_document) 732 if (!securityOrigin && m_document)
732 securityOrigin = m_document->getSecurityOrigin(); 733 securityOrigin = m_document->getSecurityOrigin();
733 734
734 if (originRestriction != FetchRequest::NoOriginRestriction && 735 if (originRestriction != FetchRequest::NoOriginRestriction &&
735 securityOrigin && !securityOrigin->canDisplay(url)) { 736 securityOrigin && !securityOrigin->canDisplay(url)) {
736 if (reportingPolicy == SecurityViolationReportingPolicy::Report) 737 if (reportingPolicy == SecurityViolationReportingPolicy::Report)
737 FrameLoader::reportLocalLoadFailed(frame(), url.elidedString()); 738 FrameLoader::reportLocalLoadFailed(frame(), url.elidedString());
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 return frame()->frameScheduler()->loadingTaskRunner(); 1065 return frame()->frameScheduler()->loadingTaskRunner();
1065 } 1066 }
1066 1067
1067 DEFINE_TRACE(FrameFetchContext) { 1068 DEFINE_TRACE(FrameFetchContext) {
1068 visitor->trace(m_document); 1069 visitor->trace(m_document);
1069 visitor->trace(m_documentLoader); 1070 visitor->trace(m_documentLoader);
1070 FetchContext::trace(visitor); 1071 FetchContext::trace(visitor);
1071 } 1072 }
1072 1073
1073 } // namespace blink 1074 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp ('k') | third_party/WebKit/Source/core/probe/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698