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

Side by Side Diff: content/common/websocket.h

Issue 157023003: Use validating IPC enum macros in websocket messages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/common/websocket_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_COMMON_WEBSOCKET_H_ 5 #ifndef CONTENT_COMMON_WEBSOCKET_H_
6 #define CONTENT_COMMON_WEBSOCKET_H_ 6 #define CONTENT_COMMON_WEBSOCKET_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "url/gurl.h" 13 #include "url/gurl.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 // WebSocket data message types sent between the browser and renderer processes. 17 // WebSocket data message types sent between the browser and renderer processes.
18 enum WebSocketMessageType { 18 enum WebSocketMessageType {
19 WEB_SOCKET_MESSAGE_TYPE_CONTINUATION = 0x0, 19 WEB_SOCKET_MESSAGE_TYPE_CONTINUATION = 0x0,
20 WEB_SOCKET_MESSAGE_TYPE_TEXT = 0x1, 20 WEB_SOCKET_MESSAGE_TYPE_TEXT = 0x1,
21 WEB_SOCKET_MESSAGE_TYPE_BINARY = 0x2 21 WEB_SOCKET_MESSAGE_TYPE_BINARY = 0x2,
22 WEB_SOCKET_MESSAGE_TYPE_LAST = WEB_SOCKET_MESSAGE_TYPE_BINARY
22 }; 23 };
23 24
24 // Opening handshake request information which will be shown in the inspector. 25 // Opening handshake request information which will be shown in the inspector.
25 // All string data should be encoded to ASCII in the browser process. 26 // All string data should be encoded to ASCII in the browser process.
26 struct WebSocketHandshakeRequest { 27 struct WebSocketHandshakeRequest {
27 WebSocketHandshakeRequest(); 28 WebSocketHandshakeRequest();
28 ~WebSocketHandshakeRequest(); 29 ~WebSocketHandshakeRequest();
29 30
30 // The request URL 31 // The request URL
31 GURL url; 32 GURL url;
(...skipping 17 matching lines...) Expand all
49 std::string status_text; 50 std::string status_text;
50 // Additional HTTP response headers 51 // Additional HTTP response headers
51 std::vector<std::pair<std::string, std::string> > headers; 52 std::vector<std::pair<std::string, std::string> > headers;
52 // The time that this response arrives 53 // The time that this response arrives
53 base::Time response_time; 54 base::Time response_time;
54 }; 55 };
55 56
56 } // namespace content 57 } // namespace content
57 58
58 #endif // CONTENT_COMMON_WEBSOCKET_H_ 59 #endif // CONTENT_COMMON_WEBSOCKET_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/websocket_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698