Chromium Code Reviews| Index: media/base/decrypt_config.h |
| diff --git a/media/base/decrypt_config.h b/media/base/decrypt_config.h |
| index febd0fe866968a244379ef2d875656426970e06c..553b3004928d44af191e8646785ea06da1b4d593 100644 |
| --- a/media/base/decrypt_config.h |
| +++ b/media/base/decrypt_config.h |
| @@ -5,6 +5,7 @@ |
| #ifndef MEDIA_BASE_DECRYPT_CONFIG_H_ |
| #define MEDIA_BASE_DECRYPT_CONFIG_H_ |
| +#include <ostream> |
| #include <string> |
| #include <vector> |
| @@ -56,6 +57,9 @@ class MEDIA_EXPORT DecryptConfig { |
| // Returns true if all fields in |config| match this config. |
| bool Matches(const DecryptConfig& config) const; |
| + // Prints to std::ostream. |
| + std::ostream& Print(std::ostream& os) const; |
| + |
| private: |
| const std::string key_id_; |
| @@ -71,4 +75,9 @@ class MEDIA_EXPORT DecryptConfig { |
| } // namespace media |
| +inline std::ostream& operator<<(std::ostream& os, |
|
xhwang
2015/10/22 06:13:51
We don't like to overload operators, even for logg
Tima Vaisburd
2015/10/22 17:15:45
May I ask why? In my humble and maybe uninformed o
xhwang
2015/10/22 18:11:25
I searched around and do see some use of operator<
|
| + const media::DecryptConfig& obj) { |
| + return obj.Print(os); |
| +} |
| + |
| #endif // MEDIA_BASE_DECRYPT_CONFIG_H_ |