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

Unified Diff: net/websockets/websocket_basic_handshake_stream.cc

Issue 1050013002: [WebSocketExtensionParser] Have Consume.* methods return bool instead of using has_error() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed #7, Rebased Created 5 years, 8 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
« no previous file with comments | « net/server/web_socket_encoder.cc ('k') | net/websockets/websocket_extension_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_basic_handshake_stream.cc
diff --git a/net/websockets/websocket_basic_handshake_stream.cc b/net/websockets/websocket_basic_handshake_stream.cc
index a4a7d7b5fd5a3e9295dab33f33455361628a35e8..7bb34a335c75898f6b6de9e8e9e373542bb4c068 100644
--- a/net/websockets/websocket_basic_handshake_stream.cc
+++ b/net/websockets/websocket_basic_handshake_stream.cc
@@ -315,8 +315,7 @@ bool ValidateExtensions(const HttpResponseHeaders* headers,
while (headers->EnumerateHeader(&state, websockets::kSecWebSocketExtensions,
&header_value)) {
WebSocketExtensionParser parser;
- parser.Parse(header_value);
- if (parser.has_error()) {
+ if (!parser.Parse(header_value)) {
// TODO(yhirano) Set appropriate failure message.
*failure_message =
"'Sec-WebSocket-Extensions' header value is "
« no previous file with comments | « net/server/web_socket_encoder.cc ('k') | net/websockets/websocket_extension_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698