| Index: mojo/public/cpp/bindings/string_traits_standard.h
|
| diff --git a/mojo/public/cpp/bindings/string_traits_standard.h b/mojo/public/cpp/bindings/string_traits_standard.h
|
| index 056546eb4df3351a0efe343e58594abf4b57891d..ba31f222cf0bd64eafea3a72613e5d8080925083 100644
|
| --- a/mojo/public/cpp/bindings/string_traits_standard.h
|
| +++ b/mojo/public/cpp/bindings/string_traits_standard.h
|
| @@ -18,11 +18,9 @@ struct StringTraits<String> {
|
|
|
| static const char* GetData(const String& input) { return input.data(); }
|
|
|
| - // TODO(yzshen): Use a public type, such as mojo::String::DataView, for
|
| - // |input|.
|
| - static bool Read(internal::String_Data* input, String* output) {
|
| - if (input) {
|
| - String result(input->storage(), input->size());
|
| + static bool Read(StringDataView input, String* output) {
|
| + if (!input.is_null()) {
|
| + String result(input.storage(), input.size());
|
| result.Swap(output);
|
| } else {
|
| *output = nullptr;
|
|
|