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

Unified Diff: third_party/WebKit/Source/core/loader/BaseFetchContext.cpp

Issue 2900613002: Support DevTools for off-main-thread-fetch (Closed)
Patch Set: incorporated kinuko's comment Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/loader/BaseFetchContext.cpp
diff --git a/third_party/WebKit/Source/core/loader/BaseFetchContext.cpp b/third_party/WebKit/Source/core/loader/BaseFetchContext.cpp
index 7134f9cfb4d51349a7bc472347142dbb5a177979..33debb45ea8ece75a0476ea6560c1552012dcef2 100644
--- a/third_party/WebKit/Source/core/loader/BaseFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/BaseFetchContext.cpp
@@ -10,6 +10,7 @@
#include "core/inspector/ConsoleMessage.h"
#include "core/loader/SubresourceFilter.h"
#include "core/loader/private/FrameClientHintsPreferencesContext.h"
+#include "core/probe/CoreProbes.h"
#include "platform/exported/WrappedResourceRequest.h"
#include "platform/loader/fetch/FetchInitiatorTypeNames.h"
#include "platform/loader/fetch/Resource.h"
@@ -53,6 +54,12 @@ SecurityOrigin* BaseFetchContext::GetSecurityOrigin() const {
return execution_context_ ? execution_context_->GetSecurityOrigin() : nullptr;
}
+void BaseFetchContext::DispatchDidReceiveEncodedData(unsigned long identifier,
+ int encoded_data_length) {
+ probe::didReceiveEncodedDataLength(execution_context_, identifier,
+ encoded_data_length);
+}
+
ResourceRequestBlockedReason BaseFetchContext::CanRequest(
Resource::Type type,
const ResourceRequest& resource_request,
@@ -177,7 +184,10 @@ ResourceRequestBlockedReason BaseFetchContext::CanRequestInternal(
SecurityViolationReportingPolicy reporting_policy,
FetchParameters::OriginRestriction origin_restriction,
ResourceRequest::RedirectStatus redirect_status) const {
- if (ShouldBlockRequestByInspector(resource_request))
+ bool should_block_request = false;
+ probe::shouldBlockRequest(execution_context_, resource_request,
+ &should_block_request);
+ if (should_block_request)
return ResourceRequestBlockedReason::kInspector;
SecurityOrigin* security_origin = options.security_origin.Get();

Powered by Google App Engine
This is Rietveld 408576698