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

Unified Diff: Source/core/fetch/CrossOriginAccessControl.cpp

Issue 123003002: Make calls to AtomicString(const String&) explicit in loader/ and fetch/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 12 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
« no previous file with comments | « no previous file | Source/core/fetch/ImageResourceTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/CrossOriginAccessControl.cpp
diff --git a/Source/core/fetch/CrossOriginAccessControl.cpp b/Source/core/fetch/CrossOriginAccessControl.cpp
index f35116c73f8768f9ab7137e1e2cf66ed28278cf6..33a60d0ae78ebceab697275e4e97fdd959c3f6ff 100644
--- a/Source/core/fetch/CrossOriginAccessControl.cpp
+++ b/Source/core/fetch/CrossOriginAccessControl.cpp
@@ -102,7 +102,7 @@ void updateRequestForAccessControl(ResourceRequest& request, SecurityOrigin* sec
request.setAllowCookies(allowCredentials == AllowStoredCredentials);
if (securityOrigin)
- request.setHTTPOrigin(securityOrigin->toString());
+ request.setHTTPOrigin(securityOrigin->toAtomicString());
}
ResourceRequest createAccessControlPreflightRequest(const ResourceRequest& request, SecurityOrigin* securityOrigin)
@@ -127,7 +127,7 @@ ResourceRequest createAccessControlPreflightRequest(const ResourceRequest& reque
headerBuffer.append(it->key);
}
- preflightRequest.setHTTPHeaderField("Access-Control-Request-Headers", headerBuffer.toString().lower());
+ preflightRequest.setHTTPHeaderField("Access-Control-Request-Headers", AtomicString(headerBuffer.toString().lower()));
}
return preflightRequest;
@@ -149,7 +149,7 @@ bool passesAccessControlCheck(const ResourceResponse& response, StoredCredential
if (accessControlOriginString == starAtom && includeCredentials == DoNotAllowStoredCredentials)
return true;
- if (accessControlOriginString != securityOrigin->toString()) {
+ if (accessControlOriginString != securityOrigin->toAtomicString()) {
if (accessControlOriginString == starAtom) {
errorDescription = "A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin '" + securityOrigin->toString() + "' is therefore not allowed access.";
} else if (accessControlOriginString.isEmpty()) {
« no previous file with comments | « no previous file | Source/core/fetch/ImageResourceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698