Chromium Code Reviews| Index: media/base/decrypt_config.cc |
| diff --git a/media/base/decrypt_config.cc b/media/base/decrypt_config.cc |
| index 7df9216ed98975b9525282994b6aa9c030689249..2f0535f0158d48252a617f9fcebd518bfefe361f 100644 |
| --- a/media/base/decrypt_config.cc |
| +++ b/media/base/decrypt_config.cc |
| @@ -4,6 +4,7 @@ |
| #include "media/base/decrypt_config.h" |
| +#include <iomanip> |
| #include "base/logging.h" |
| namespace media { |
| @@ -37,4 +38,22 @@ bool DecryptConfig::Matches(const DecryptConfig& config) const { |
| return true; |
| } |
| +std::ostream& DecryptConfig::Print(std::ostream& os) const { |
| + os << "key_id:" << std::hex << std::setfill('0'); |
| + for (char ch : key_id_) |
| + os << std::setw(2) << static_cast<int>(ch); |
|
xhwang
2015/10/22 06:13:51
Here and below, will base::HexEncode() make things
Tima Vaisburd
2015/10/22 21:57:26
Done.
|
| + |
| + os << " iv:'" << std::hex << std::setfill('0'); |
| + for (char ch : iv_) |
| + os << std::setw(2) << static_cast<int>(ch); |
| + |
| + os << std::dec << std::setfill(' ') << "' subsamples:["; |
| + for (SubsampleEntry entry : subsamples_) { |
| + os << "(clear:" << entry.clear_bytes << ", cypher:" << entry.cypher_bytes |
| + << ")"; |
| + } |
| + os << "]"; |
| + return os; |
| +} |
| + |
| } // namespace media |