Chromium Code Reviews| Index: net/der/input.cc |
| diff --git a/net/der/input.cc b/net/der/input.cc |
| index 45edfdcca67fde5ad002f151d6f2deb7e39c0870..004034e3ecd17cd93b8f87c040c3f5441fb0714b 100644 |
| --- a/net/der/input.cc |
| +++ b/net/der/input.cc |
| @@ -17,6 +17,10 @@ Input::Input() : data_(nullptr), len_(0) { |
| Input::Input(const uint8_t* data, size_t len) : data_(data), len_(len) { |
| } |
| +Input::Input(const std::string& s) |
| + : data_(reinterpret_cast<const uint8_t*>(s.data())), len_(s.size()) { |
| +} |
| + |
| bool Input::Equals(const Input& other) const { |
| if (len_ != other.len_) |
| return false; |