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

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceLoaderOptions.cpp

Issue 1801513003: Cross origin requests to same origin should match Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed failing CORS tests Created 4 years, 9 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/fetch/ResourceLoaderOptions.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceLoaderOptions.cpp b/third_party/WebKit/Source/core/fetch/ResourceLoaderOptions.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..86bd4645af886297cd0d59eb03be3b3dfbe7425b
--- /dev/null
+++ b/third_party/WebKit/Source/core/fetch/ResourceLoaderOptions.cpp
@@ -0,0 +1,21 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+#include "core/fetch/ResourceLoaderOptions.h"
+
+namespace blink {
+
+bool ResourceLoaderOptions::canReuseRequest(const ResourceLoaderOptions& other) const
Nate Chapin 2016/03/17 22:58:18 Why create a .cpp for this?
Yoav Weiss 2016/03/18 07:53:14 Because a ~2000 file rebuild every time I experime
+{
+ // dataBufferingPolicy differences are believed to be safe for re-use.
+ // FIXME: check allowCredentials.
+ // FIXME: check credentialsRequested.
+ // FIXME: check contentSecurityPolicyOption.
+ // initiatorInfo is purely informational and should be benign for re-use.
+ // requestInitiatorContext is benign (indicates document vs. worker)
+ // synchronousPolicy (safe to re-use an async XHR response for sync, etc.)
+ return corsEnabled == other.corsEnabled || (sameOrigin == other.sameOrigin && sameOrigin == IsSameOrigin);
+ // securityOrigin has more complicated checks which callers are responsible for.
+}
+
+}

Powered by Google App Engine
This is Rietveld 408576698