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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebSocketHandshakeRequest_h 31 #ifndef WebSocketHandshakeRequest_h
32 #define WebSocketHandshakeRequest_h 32 #define WebSocketHandshakeRequest_h
33 33
34 #include "platform/network/HTTPRequest.h" 34 #include "platform/network/HTTPRequest.h"
35 35
36 namespace WebCore { 36 namespace WebCore {
37 37
38 class HTTPHeaderMap;
39
38 class PLATFORM_EXPORT WebSocketHandshakeRequest : public HTTPRequest { 40 class PLATFORM_EXPORT WebSocketHandshakeRequest : public HTTPRequest {
39 public: 41 public:
40 static PassRefPtr<WebSocketHandshakeRequest> create(const String& requestMet hod, const KURL& url) { return adoptRef(new WebSocketHandshakeRequest(requestMet hod, url)); } 42 static PassRefPtr<WebSocketHandshakeRequest> create(const String& requestMet hod, const KURL& url) { return adoptRef(new WebSocketHandshakeRequest(requestMet hod, url)); }
41 static PassRefPtr<WebSocketHandshakeRequest> create() { return adoptRef(new WebSocketHandshakeRequest); } 43 static PassRefPtr<WebSocketHandshakeRequest> create() { return adoptRef(new WebSocketHandshakeRequest); }
42 ~WebSocketHandshakeRequest(); 44 ~WebSocketHandshakeRequest();
43 45
46 void addAndMergeHeader(const AtomicString& name, const AtomicString& value) { addAndMergeHeader(&m_headerFields, name, value); }
47
48 // Merges the existing value with |value| in |map| if |map| already has |nam e|.
49 // Associates |value| with |name| in |map| otherwise.
50 // This function builds data for inspector.
51 static void addAndMergeHeader(HTTPHeaderMap* /* map */, const AtomicString& name, const AtomicString& value);
52
44 private: 53 private:
45 WebSocketHandshakeRequest(const String& requestMethod, const KURL&); 54 WebSocketHandshakeRequest(const String& requestMethod, const KURL&);
46 WebSocketHandshakeRequest(); 55 WebSocketHandshakeRequest();
47 }; 56 };
48 57
49 } // namespace WebCore 58 } // namespace WebCore
50 59
51 #endif // WebSocketHandshakeRequest_h 60 #endif // WebSocketHandshakeRequest_h
OLDNEW
« 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