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

Unified Diff: Source/modules/websockets/WebSocketHandshake.cpp

Issue 112673007: Make calls to AtomicString(const String&) explicit in modules/websockets/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 | no next file » | 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 b0ed328eb15260c46a096eeea958649db3264814..9d52c9fbf743d327d3cb1661692059e52cf91cfc 100644
--- a/Source/modules/websockets/WebSocketHandshake.cpp
+++ b/Source/modules/websockets/WebSocketHandshake.cpp
@@ -256,31 +256,31 @@ PassRefPtr<WebSocketHandshakeRequest> WebSocketHandshake::clientHandshakeRequest
RefPtr<WebSocketHandshakeRequest> request = WebSocketHandshakeRequest::create("GET", m_url);
request->addHeaderField("Upgrade", "websocket");
request->addHeaderField("Connection", "Upgrade");
- request->addHeaderField("Host", hostName(m_url, m_secure));
- request->addHeaderField("Origin", clientOrigin());
+ request->addHeaderField("Host", AtomicString(hostName(m_url, m_secure)));
+ request->addHeaderField("Origin", AtomicString(clientOrigin()));
if (!m_clientProtocol.isEmpty())
- request->addHeaderField("Sec-WebSocket-Protocol", m_clientProtocol);
+ request->addHeaderField("Sec-WebSocket-Protocol", AtomicString(m_clientProtocol));
KURL url = httpURLForAuthenticationAndCookies();
if (m_context->isDocument()) {
Document* document = toDocument(m_context);
String cookie = cookieRequestHeaderFieldValue(document, url);
if (!cookie.isEmpty())
- request->addHeaderField("Cookie", cookie);
+ request->addHeaderField("Cookie", AtomicString(cookie));
// Set "Cookie2: <cookie>" if cookies 2 exists for url?
}
request->addHeaderField("Pragma", "no-cache");
request->addHeaderField("Cache-Control", "no-cache");
- request->addHeaderField("Sec-WebSocket-Key", m_secWebSocketKey);
+ request->addHeaderField("Sec-WebSocket-Key", AtomicString(m_secWebSocketKey));
request->addHeaderField("Sec-WebSocket-Version", "13");
const String extensionValue = m_extensionDispatcher.createHeaderValue();
if (extensionValue.length())
- request->addHeaderField("Sec-WebSocket-Extensions", extensionValue);
+ request->addHeaderField("Sec-WebSocket-Extensions", AtomicString(extensionValue));
// Add a User-Agent header.
- request->addHeaderField("User-Agent", m_context->userAgent(m_context->url()));
+ request->addHeaderField("User-Agent", AtomicString(m_context->userAgent(m_context->url())));
return request.release();
}
@@ -520,7 +520,7 @@ const char* WebSocketHandshake::readHTTPHeaders(const char* start, const char* e
String extensions = m_extensionDispatcher.acceptedExtensions();
if (!extensions.isEmpty())
- m_response.addHeaderField("Sec-WebSocket-Extensions", extensions);
+ m_response.addHeaderField("Sec-WebSocket-Extensions", AtomicString(extensions));
return p;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698