Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: mojo/public/cpp/bindings/tests/struct_with_traits_impl_traits.h

Issue 1867483002: Mojo: Align string sizes when serializing a native type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_TESTS_STRUCT_WITH_TRAITS_IMPL_TRAITS_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_TESTS_STRUCT_WITH_TRAITS_IMPL_TRAITS_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_TESTS_STRUCT_WITH_TRAITS_IMPL_TRAITS_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_TESTS_STRUCT_WITH_TRAITS_IMPL_TRAITS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 20 matching lines...) Expand all
31 return value.get_uint32(); 31 return value.get_uint32();
32 } 32 }
33 33
34 static uint64_t f_uint64(const test::StructWithTraitsImpl& value) { 34 static uint64_t f_uint64(const test::StructWithTraitsImpl& value) {
35 return value.get_uint64(); 35 return value.get_uint64();
36 } 36 }
37 37
38 static base::StringPiece f_string(const test::StructWithTraitsImpl& value) { 38 static base::StringPiece f_string(const test::StructWithTraitsImpl& value) {
39 return value.get_string(); 39 return value.get_string();
40 } 40 }
41
42 static base::StringPiece f_string2(const test::StructWithTraitsImpl& value) {
43 return value.get_string();
44 }
41 }; 45 };
42 46
43 } // namespace mojo 47 } // namespace mojo
44 48
45 #endif // MOJO_PUBLIC_CPP_BINDINGS_TESTS_STRUCT_WITH_TRAITS_IMPL_TRAITS_H_ 49 #endif // MOJO_PUBLIC_CPP_BINDINGS_TESTS_STRUCT_WITH_TRAITS_IMPL_TRAITS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698