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

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

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: Nate's feedback 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.h
diff --git a/third_party/WebKit/Source/platform/network/ResourceRequest.h b/third_party/WebKit/Source/platform/network/ResourceRequest.h
index 568a00063ab73c2f1044b6d50f5d94a6cf554ee0..a684d24868e865144c47ca7ac694ef0881dd7254 100644
--- a/third_party/WebKit/Source/platform/network/ResourceRequest.h
+++ b/third_party/WebKit/Source/platform/network/ResourceRequest.h
@@ -61,6 +61,13 @@ enum InputToLoadPerfMetricReportPolicy {
ReportIntent, // Report metrics for this request as initiated by an intent.
};
+enum InterventionsFlag {
+ InterventionNone = 0,
+ // Indicates that the doc written script was blocked and this is an async
+ // fetch for it. This is used to set the lowest priority.
+ InterventionBlockedDocWriteScriptAsyncFetch = 1 << 0,
+};
+
struct CrossThreadResourceRequestData;
class PLATFORM_EXPORT ResourceRequest final {
@@ -147,6 +154,7 @@ public:
ResourceLoadPriority priority() const;
void setPriority(ResourceLoadPriority, int intraPriorityValue = 0);
+ ResourceLoadPriority computePriorityForInterventions(ResourceLoadPriority) const;
bool isConditional() const;
@@ -237,6 +245,8 @@ public:
void setRedirectStatus(RedirectStatus status) { m_redirectStatus = status; }
RedirectStatus redirectStatus() const { return m_redirectStatus; }
+ void setInterventionsInfo(int flag) { m_interventionsInfo = m_interventionsInfo | flag; }
+
private:
void initialize(const KURL&);
@@ -258,6 +268,7 @@ private:
bool m_downloadToFile : 1;
bool m_useStreamOnResponse : 1;
bool m_shouldResetAppCache : 1;
+ int m_interventionsInfo;
WebURLRequest::SkipServiceWorker m_skipServiceWorker;
ResourceLoadPriority m_priority;
int m_intraPriorityValue;

Powered by Google App Engine
This is Rietveld 408576698