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

Unified Diff: third_party/WebKit/Source/platform/network/ResourceRequest.cpp

Issue 2260303002: Sending an async GET request for doc.written blocked scripts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test added, failed bot tests fixed, converted to enum. Created 4 years, 4 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/platform/network/ResourceRequest.cpp
diff --git a/third_party/WebKit/Source/platform/network/ResourceRequest.cpp b/third_party/WebKit/Source/platform/network/ResourceRequest.cpp
index 99b0af315da7956d87f4fd9505f138ffa1b82c5e..d0258e35f435e61acab12ce83dbdeb08a4cea5f7 100644
--- a/third_party/WebKit/Source/platform/network/ResourceRequest.cpp
+++ b/third_party/WebKit/Source/platform/network/ResourceRequest.cpp
@@ -93,6 +93,7 @@ ResourceRequest::ResourceRequest(CrossThreadResourceRequestData* data)
m_isExternalRequest = data->m_isExternalRequest;
m_inputPerfMetricReportPolicy = data->m_inputPerfMetricReportPolicy;
m_redirectStatus = data->m_redirectStatus;
+ m_interventionsInfo = InterventionsFlag::InterventionNone;
}
ResourceRequest::ResourceRequest(const ResourceRequest&) = default;
@@ -339,6 +340,13 @@ void ResourceRequest::setPriority(ResourceLoadPriority priority, int intraPriori
m_intraPriorityValue = intraPriorityValue;
}
+ResourceLoadPriority ResourceRequest::computePriorityForInterventions(ResourceLoadPriority priority) const
+{
+ if (m_interventionsInfo & InterventionsFlag::InterventionBlockedDocWriteScriptAsyncFetch)
+ return ResourceLoadPriorityLowest;
+ return priority;
+}
+
void ResourceRequest::addHTTPHeaderField(const AtomicString& name, const AtomicString& value)
{
HTTPHeaderMap::AddResult result = m_httpHeaderFields.add(name, value);
@@ -449,6 +457,7 @@ void ResourceRequest::initialize(const KURL& url)
m_inputPerfMetricReportPolicy = InputToLoadPerfMetricReportPolicy::NoReport;
m_redirectStatus = RedirectStatus::NoRedirect;
m_requestorOrigin = SecurityOrigin::createUnique();
+ m_interventionsInfo = InterventionsFlag::InterventionNone;
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698