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

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

Issue 2264503002: Clean up SecurityOrigin handling around CrossOriginAccessControl::handleRedirect() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
« no previous file with comments | « third_party/WebKit/Source/platform/network/ResourceRequest.h ('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/platform/network/ResourceRequest.cpp
diff --git a/third_party/WebKit/Source/platform/network/ResourceRequest.cpp b/third_party/WebKit/Source/platform/network/ResourceRequest.cpp
index 99b0af315da7956d87f4fd9505f138ffa1b82c5e..3e63db337cff78fbb3111d687e3e9e252b3b70dc 100644
--- a/third_party/WebKit/Source/platform/network/ResourceRequest.cpp
+++ b/third_party/WebKit/Source/platform/network/ResourceRequest.cpp
@@ -253,7 +253,7 @@ void ResourceRequest::clearHTTPReferrer()
m_didSetHTTPReferrer = false;
}
-void ResourceRequest::setHTTPOrigin(PassRefPtr<SecurityOrigin> origin)
+void ResourceRequest::setHTTPOrigin(const SecurityOrigin* origin)
{
setHTTPHeaderField(HTTPNames::Origin, origin->toAtomicString());
if (origin->hasSuborigin())
@@ -266,7 +266,7 @@ void ResourceRequest::clearHTTPOrigin()
m_httpHeaderFields.remove(HTTPNames::Suborigin);
}
-void ResourceRequest::addHTTPOriginIfNeeded(PassRefPtr<SecurityOrigin> origin)
+void ResourceRequest::addHTTPOriginIfNeeded(const SecurityOrigin* origin)
{
if (!httpOrigin().isEmpty())
return; // Request already has an Origin header.
@@ -287,7 +287,7 @@ void ResourceRequest::addHTTPOriginIfNeeded(PassRefPtr<SecurityOrigin> origin)
if (originString.isEmpty()) {
// If we don't know what origin header to attach, we attach the value
// for an empty origin.
- setHTTPOrigin(SecurityOrigin::createUnique());
+ setHTTPOrigin(SecurityOrigin::createUnique().get());
return;
}
setHTTPOrigin(origin);
« no previous file with comments | « third_party/WebKit/Source/platform/network/ResourceRequest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698