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

Unified Diff: trunk/src/net/websockets/websocket_handshake_handler.cc

Issue 101113004: Revert 239759 "The comment in base64.h implies that base::Base64..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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
Index: trunk/src/net/websockets/websocket_handshake_handler.cc
===================================================================
--- trunk/src/net/websockets/websocket_handshake_handler.cc (revision 239920)
+++ trunk/src/net/websockets/websocket_handshake_handler.cc (working copy)
@@ -351,7 +351,8 @@
std::string hash =
base::SHA1HashString(key + websockets::kWebSocketGuid);
- base::Base64Encode(hash, accept);
+ bool encode_success = base::Base64Encode(hash, accept);
+ DCHECK(encode_success);
}
bool WebSocketHandshakeResponseHandler::ParseResponseInfo(
@@ -404,7 +405,8 @@
std::string hash =
base::SHA1HashString(challenge + websockets::kWebSocketGuid);
std::string websocket_accept;
- base::Base64Encode(hash, &websocket_accept);
+ bool encode_success = base::Base64Encode(hash, &websocket_accept);
+ DCHECK(encode_success);
std::string response_message = base::StringPrintf(
"%s %s\r\n", websockets::kHttpProtocolVersion, status->second.c_str());
« no previous file with comments | « trunk/src/net/websockets/websocket_basic_handshake_stream.cc ('k') | trunk/src/remoting/base/rsa_key_pair.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698