Chromium Code Reviews| Index: net/quic/core/quic_crypto_server_stream.cc |
| diff --git a/net/quic/core/quic_crypto_server_stream.cc b/net/quic/core/quic_crypto_server_stream.cc |
| index f1b604141e575e7c9585eba87f7d31a879916da0..641f034ee2ec4eec8389d6699d52792504b31c66 100644 |
| --- a/net/quic/core/quic_crypto_server_stream.cc |
| +++ b/net/quic/core/quic_crypto_server_stream.cc |
| @@ -17,6 +17,7 @@ |
| #include "net/quic/core/quic_flags.h" |
| #include "net/quic/core/quic_packets.h" |
| #include "net/quic/core/quic_session.h" |
| +#include "net/quic/platform/api/quic_text_utils.h" |
| using base::StringPiece; |
| using std::string; |
| @@ -421,19 +422,7 @@ bool QuicCryptoServerStream::GetBase64SHA256ClientChannelID( |
| uint8_t digest[32]; |
| hash->Finish(digest, sizeof(digest)); |
| - base::Base64Encode( |
| - string(reinterpret_cast<const char*>(digest), sizeof(digest)), output); |
| - // Remove padding. |
| - size_t len = output->size(); |
| - if (len >= 2) { |
| - if ((*output)[len - 1] == '=') { |
| - len--; |
| - if ((*output)[len - 1] == '=') { |
| - len--; |
| - } |
| - output->resize(len); |
|
Jana
2016/12/27 23:52:48
Why's this resize not required anymore?
Ryan Hamilton
2016/12/28 01:48:38
All of this logic has moved into the new QuicTextU
|
| - } |
| - } |
| + QuicTextUtils::Base64Encode(digest, arraysize(digest), output); |
| return true; |
| } |