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

Unified Diff: Source/modules/websockets/WebSocketHandshake.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/modules/websockets/WebSocketHandshake.h ('k') | Source/platform/network/HTTPHeaderMap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/websockets/WebSocketHandshake.cpp
diff --git a/Source/modules/websockets/WebSocketHandshake.cpp b/Source/modules/websockets/WebSocketHandshake.cpp
index 19dcc72a08f052d234fa7df5e4092f66a1940c16..da4f77ba304c42d034d1b6b5238992582184d752 100644
--- a/Source/modules/websockets/WebSocketHandshake.cpp
+++ b/Source/modules/websockets/WebSocketHandshake.cpp
@@ -349,32 +349,32 @@ String WebSocketHandshake::failureReason() const
return m_failureReason;
}
-String WebSocketHandshake::serverWebSocketProtocol() const
+const AtomicString& WebSocketHandshake::serverWebSocketProtocol() const
{
return m_response.headerFields().get("sec-websocket-protocol");
}
-String WebSocketHandshake::serverSetCookie() const
+const AtomicString& WebSocketHandshake::serverSetCookie() const
{
return m_response.headerFields().get("set-cookie");
}
-String WebSocketHandshake::serverSetCookie2() const
+const AtomicString& WebSocketHandshake::serverSetCookie2() const
{
return m_response.headerFields().get("set-cookie2");
}
-String WebSocketHandshake::serverUpgrade() const
+const AtomicString& WebSocketHandshake::serverUpgrade() const
{
return m_response.headerFields().get("upgrade");
}
-String WebSocketHandshake::serverConnection() const
+const AtomicString& WebSocketHandshake::serverConnection() const
{
return m_response.headerFields().get("connection");
}
-String WebSocketHandshake::serverWebSocketAccept() const
+const AtomicString& WebSocketHandshake::serverWebSocketAccept() const
{
return m_response.headerFields().get("sec-websocket-accept");
}
@@ -479,7 +479,7 @@ const char* WebSocketHandshake::readHTTPHeaders(const char* start, const char* e
m_response.clearHeaderFields();
AtomicString name;
- String value;
+ AtomicString value;
bool sawSecWebSocketAcceptHeaderField = false;
bool sawSecWebSocketProtocolHeaderField = false;
const char* p = start;
@@ -527,10 +527,10 @@ const char* WebSocketHandshake::readHTTPHeaders(const char* start, const char* e
bool WebSocketHandshake::checkResponseHeaders()
{
- const String& serverWebSocketProtocol = this->serverWebSocketProtocol();
- const String& serverUpgrade = this->serverUpgrade();
- const String& serverConnection = this->serverConnection();
- const String& serverWebSocketAccept = this->serverWebSocketAccept();
+ const AtomicString& serverWebSocketProtocol = this->serverWebSocketProtocol();
+ const AtomicString& serverUpgrade = this->serverUpgrade();
+ const AtomicString& serverConnection = this->serverConnection();
+ const AtomicString& serverWebSocketAccept = this->serverWebSocketAccept();
if (serverUpgrade.isNull()) {
m_failureReason = formatHandshakeFailureReason("'Upgrade' header is missing");
« no previous file with comments | « Source/modules/websockets/WebSocketHandshake.h ('k') | Source/platform/network/HTTPHeaderMap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698