Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 13 matching lines...) Expand all Loading... | |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 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/HTTPHeaderMap.h" | |
|
tkent
2014/01/14 00:25:14
Do we need to include this?
yhirano
2014/01/14 01:17:04
Done.
| |
| 34 #include "platform/network/HTTPRequest.h" | 35 #include "platform/network/HTTPRequest.h" |
| 35 | 36 |
| 36 namespace WebCore { | 37 namespace WebCore { |
| 37 | 38 |
| 38 class PLATFORM_EXPORT WebSocketHandshakeRequest : public HTTPRequest { | 39 class PLATFORM_EXPORT WebSocketHandshakeRequest : public HTTPRequest { |
| 39 public: | 40 public: |
| 40 static PassRefPtr<WebSocketHandshakeRequest> create(const String& requestMet hod, const KURL& url) { return adoptRef(new WebSocketHandshakeRequest(requestMet hod, url)); } | 41 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); } | 42 static PassRefPtr<WebSocketHandshakeRequest> create() { return adoptRef(new WebSocketHandshakeRequest); } |
| 42 ~WebSocketHandshakeRequest(); | 43 ~WebSocketHandshakeRequest(); |
| 43 | 44 |
| 45 void addAndMergeHeader(const AtomicString& name, const AtomicString& value) { addAndMergeHeader(&m_headerFields, name, value); } | |
| 46 | |
| 47 // Merges the existing value with |value| in |map| if |map| already has |nam e|. | |
| 48 // Associates |value| with |name| in |map| otherwise. | |
| 49 // This function builds data for inspector. | |
| 50 static void addAndMergeHeader(HTTPHeaderMap* /* map */, const AtomicString& name, const AtomicString& value); | |
| 51 | |
| 44 private: | 52 private: |
| 45 WebSocketHandshakeRequest(const String& requestMethod, const KURL&); | 53 WebSocketHandshakeRequest(const String& requestMethod, const KURL&); |
| 46 WebSocketHandshakeRequest(); | 54 WebSocketHandshakeRequest(); |
| 47 }; | 55 }; |
| 48 | 56 |
| 49 } // namespace WebCore | 57 } // namespace WebCore |
| 50 | 58 |
| 51 #endif // WebSocketHandshakeRequest_h | 59 #endif // WebSocketHandshakeRequest_h |
| OLD | NEW |