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

Unified Diff: Source/platform/network/WebSocketHandshakeRequest.h

Issue 130863002: [WebSocket] Merge duplicated HTTP headers for devtools (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed a platform dependent test Created 6 years, 11 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
Index: Source/platform/network/WebSocketHandshakeRequest.h
diff --git a/Source/platform/network/WebSocketHandshakeRequest.h b/Source/platform/network/WebSocketHandshakeRequest.h
index 87786fb8a0250fea3b743379b23cd467f2237591..a186ae3ccb2c7ca8dbfd72ef642bb253b47f08e0 100644
--- a/Source/platform/network/WebSocketHandshakeRequest.h
+++ b/Source/platform/network/WebSocketHandshakeRequest.h
@@ -35,12 +35,21 @@
namespace WebCore {
+class HTTPHeaderMap;
+
class PLATFORM_EXPORT WebSocketHandshakeRequest : public HTTPRequest {
public:
static PassRefPtr<WebSocketHandshakeRequest> create(const String& requestMethod, const KURL& url) { return adoptRef(new WebSocketHandshakeRequest(requestMethod, url)); }
static PassRefPtr<WebSocketHandshakeRequest> create() { return adoptRef(new WebSocketHandshakeRequest); }
~WebSocketHandshakeRequest();
+ void addAndMergeHeader(const AtomicString& name, const AtomicString& value) { addAndMergeHeader(&m_headerFields, name, value); }
+
+ // Merges the existing value with |value| in |map| if |map| already has |name|.
+ // Associates |value| with |name| in |map| otherwise.
+ // This function builds data for inspector.
+ static void addAndMergeHeader(HTTPHeaderMap* /* map */, const AtomicString& name, const AtomicString& value);
+
private:
WebSocketHandshakeRequest(const String& requestMethod, const KURL&);
WebSocketHandshakeRequest();
« no previous file with comments | « LayoutTests/http/tests/websocket/duplicated-headers_wsh.py ('k') | Source/platform/network/WebSocketHandshakeRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698