Chromium Code Reviews| 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. |
| +} |
| + |
| +} |