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

Unified Diff: third_party/WebKit/Source/core/loader/ThreadableLoader.h

Issue 2570473002: Enable the CORS preflight for sendBeacon()
Patch Set: Created 4 years 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
« no previous file with comments | « third_party/WebKit/Source/core/loader/PingLoader.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/ThreadableLoader.h
diff --git a/third_party/WebKit/Source/core/loader/ThreadableLoader.h b/third_party/WebKit/Source/core/loader/ThreadableLoader.h
index 9e8c56c6bc826de43fc680b5f4828c4eb83a1c60..36ec341f19c2aa776c5316bce9f7778944519975 100644
--- a/third_party/WebKit/Source/core/loader/ThreadableLoader.h
+++ b/third_party/WebKit/Source/core/loader/ThreadableLoader.h
@@ -58,13 +58,19 @@ enum ContentSecurityPolicyEnforcement {
DoNotEnforceContentSecurityPolicy,
};
+enum SchedulerWaitingPolicy {
+ PreventSchedulerFromWaiting,
+ DoNotPreventSchedulerFromWaiting,
+};
+
struct ThreadableLoaderOptions {
DISALLOW_NEW();
ThreadableLoaderOptions()
: preflightPolicy(ConsiderPreflight),
crossOriginRequestPolicy(DenyCrossOriginRequests),
contentSecurityPolicyEnforcement(EnforceContentSecurityPolicy),
- timeoutMilliseconds(0) {}
+ timeoutMilliseconds(0),
+ schedulerWaitingPolicy(DoNotPreventSchedulerFromWaiting) {}
// When adding members, CrossThreadThreadableLoaderOptionsData should
// be updated.
@@ -76,6 +82,7 @@ struct ThreadableLoaderOptions {
AtomicString initiator;
ContentSecurityPolicyEnforcement contentSecurityPolicyEnforcement;
unsigned long timeoutMilliseconds;
+ SchedulerWaitingPolicy schedulerWaitingPolicy;
};
// Encode AtomicString as String to cross threads.
@@ -88,7 +95,8 @@ struct CrossThreadThreadableLoaderOptionsData {
initiator(options.initiator.getString().isolatedCopy()),
contentSecurityPolicyEnforcement(
options.contentSecurityPolicyEnforcement),
- timeoutMilliseconds(options.timeoutMilliseconds) {}
+ timeoutMilliseconds(options.timeoutMilliseconds),
+ schedulerWaitingPolicy(options.schedulerWaitingPolicy) {}
operator ThreadableLoaderOptions() const {
ThreadableLoaderOptions options;
@@ -97,6 +105,7 @@ struct CrossThreadThreadableLoaderOptionsData {
options.initiator = AtomicString(initiator);
options.contentSecurityPolicyEnforcement = contentSecurityPolicyEnforcement;
options.timeoutMilliseconds = timeoutMilliseconds;
+ options.schedulerWaitingPolicy = schedulerWaitingPolicy;
return options;
}
@@ -105,6 +114,7 @@ struct CrossThreadThreadableLoaderOptionsData {
String initiator;
ContentSecurityPolicyEnforcement contentSecurityPolicyEnforcement;
unsigned long timeoutMilliseconds;
+ SchedulerWaitingPolicy schedulerWaitingPolicy;
};
template <>
« no previous file with comments | « third_party/WebKit/Source/core/loader/PingLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698