1 // Copyright 2017 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "mojo/common/common_custom_types_struct_traits.h" 6 7 namespace mojo { 8 9 // static 10 bool StructTraits<common::mojom::String16, base::string16>::Read( 11 common::mojom::String16DataView data, base::string16* out) { 12 std::vector<uint16_t> view; 13 data.ReadData(&view); 14 out->assign(reinterpret_cast<const base::char16*>(view.data()), view.size()); 15 return true; 16 } 17 18 } // mojo 19