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

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

Issue 99733002: Update HTTPHeaderMap wrappers to use AtomicString type for header values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 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 | « Source/platform/network/ResourceRequest.h ('k') | Source/platform/network/ResourceResponse.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/network/ResourceRequest.cpp
diff --git a/Source/platform/network/ResourceRequest.cpp b/Source/platform/network/ResourceRequest.cpp
index 9a944eb4d81f9d875faf692f19650c7d73642c2e..143122c6ca14cc62c22d6ac9381683705c39c1d7 100644
--- a/Source/platform/network/ResourceRequest.cpp
+++ b/Source/platform/network/ResourceRequest.cpp
@@ -38,7 +38,7 @@ PassOwnPtr<ResourceRequest> ResourceRequest::adopt(PassOwnPtr<CrossThreadResourc
request->setCachePolicy(data->m_cachePolicy);
request->setTimeoutInterval(data->m_timeoutInterval);
request->setFirstPartyForCookies(data->m_firstPartyForCookies);
- request->setHTTPMethod(data->m_httpMethod);
+ request->setHTTPMethod(AtomicString(data->m_httpMethod));
request->setPriority(data->m_priority);
request->m_httpHeaderFields.adopt(data->m_httpHeaders.release());
@@ -62,7 +62,7 @@ PassOwnPtr<CrossThreadResourceRequestData> ResourceRequest::copyData() const
data->m_cachePolicy = cachePolicy();
data->m_timeoutInterval = timeoutInterval();
data->m_firstPartyForCookies = firstPartyForCookies().copy();
- data->m_httpMethod = httpMethod().isolatedCopy();
+ data->m_httpMethod = httpMethod().string().isolatedCopy();
data->m_httpHeaders = httpHeaderFields().copyData();
data->m_priority = priority();
@@ -138,12 +138,12 @@ void ResourceRequest::setFirstPartyForCookies(const KURL& firstPartyForCookies)
m_firstPartyForCookies = firstPartyForCookies;
}
-const String& ResourceRequest::httpMethod() const
+const AtomicString& ResourceRequest::httpMethod() const
{
return m_httpMethod;
}
-void ResourceRequest::setHTTPMethod(const String& httpMethod)
+void ResourceRequest::setHTTPMethod(const AtomicString& httpMethod)
{
m_httpMethod = httpMethod;
}
@@ -153,22 +153,22 @@ const HTTPHeaderMap& ResourceRequest::httpHeaderFields() const
return m_httpHeaderFields;
}
-String ResourceRequest::httpHeaderField(const AtomicString& name) const
+AtomicString ResourceRequest::httpHeaderField(const AtomicString& name) const
{
return m_httpHeaderFields.get(name);
}
-String ResourceRequest::httpHeaderField(const char* name) const
+const AtomicString& ResourceRequest::httpHeaderField(const char* name) const
{
return m_httpHeaderFields.get(name);
}
-void ResourceRequest::setHTTPHeaderField(const AtomicString& name, const String& value)
+void ResourceRequest::setHTTPHeaderField(const AtomicString& name, const AtomicString& value)
{
m_httpHeaderFields.set(name, value);
}
-void ResourceRequest::setHTTPHeaderField(const char* name, const String& value)
+void ResourceRequest::setHTTPHeaderField(const char* name, const AtomicString& value)
{
setHTTPHeaderField(AtomicString(name), value);
}
@@ -233,7 +233,7 @@ void ResourceRequest::setPriority(ResourceLoadPriority priority)
m_priority = priority;
}
-void ResourceRequest::addHTTPHeaderField(const AtomicString& name, const String& value)
+void ResourceRequest::addHTTPHeaderField(const AtomicString& name, const AtomicString& value)
{
HTTPHeaderMap::AddResult result = m_httpHeaderFields.add(name, value);
if (!result.isNewEntry)
« no previous file with comments | « Source/platform/network/ResourceRequest.h ('k') | Source/platform/network/ResourceResponse.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698