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

Side by Side Diff: content/browser/renderer_host/websocket_dispatcher_host.h

Issue 105833003: Fail WebSocket channel when handshake fails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | content/browser/renderer_host/websocket_dispatcher_host.cc » ('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_BROWSER_RENDERER_HOST_WEBSOCKET_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_WEBSOCKET_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_WEBSOCKET_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_WEBSOCKET_DISPATCHER_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Sends a WebSocketMsg_NotifyStartOpeningHandshake IPC. 87 // Sends a WebSocketMsg_NotifyStartOpeningHandshake IPC.
88 WebSocketHostState SendStartOpeningHandshake( 88 WebSocketHostState SendStartOpeningHandshake(
89 int routing_id, 89 int routing_id,
90 const WebSocketHandshakeRequest& request) WARN_UNUSED_RESULT; 90 const WebSocketHandshakeRequest& request) WARN_UNUSED_RESULT;
91 91
92 // Sends a WebSocketMsg_NotifyFinishOpeningHandshake IPC. 92 // Sends a WebSocketMsg_NotifyFinishOpeningHandshake IPC.
93 WebSocketHostState SendFinishOpeningHandshake( 93 WebSocketHostState SendFinishOpeningHandshake(
94 int routing_id, 94 int routing_id,
95 const WebSocketHandshakeResponse& response) WARN_UNUSED_RESULT; 95 const WebSocketHandshakeResponse& response) WARN_UNUSED_RESULT;
96 96
97 // Sends a WebSocketMsg_NotifyFailure IPC and deletes and unregisters the
98 // channel.
99 WebSocketHostState NotifyFailure(
100 int routing_id,
101 const std::string& message) WARN_UNUSED_RESULT;
102
97 // Sends a WebSocketMsg_DropChannel IPC and deletes and unregisters the 103 // Sends a WebSocketMsg_DropChannel IPC and deletes and unregisters the
98 // channel. 104 // channel.
99 WebSocketHostState DoDropChannel( 105 WebSocketHostState DoDropChannel(
100 int routing_id, 106 int routing_id,
101 uint16 code, 107 uint16 code,
102 const std::string& reason) WARN_UNUSED_RESULT; 108 const std::string& reason) WARN_UNUSED_RESULT;
103 109
104 private: 110 private:
105 typedef base::hash_map<int, WebSocketHost*> WebSocketHostTable; 111 typedef base::hash_map<int, WebSocketHost*> WebSocketHostTable;
106 112
(...skipping 24 matching lines...) Expand all
131 GetRequestContextCallback get_context_callback_; 137 GetRequestContextCallback get_context_callback_;
132 138
133 WebSocketHostFactory websocket_host_factory_; 139 WebSocketHostFactory websocket_host_factory_;
134 140
135 DISALLOW_COPY_AND_ASSIGN(WebSocketDispatcherHost); 141 DISALLOW_COPY_AND_ASSIGN(WebSocketDispatcherHost);
136 }; 142 };
137 143
138 } // namespace content 144 } // namespace content
139 145
140 #endif // CONTENT_BROWSER_RENDERER_HOST_WEBSOCKET_DISPATCHER_HOST_H_ 146 #endif // CONTENT_BROWSER_RENDERER_HOST_WEBSOCKET_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/websocket_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698