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

Unified Diff: mojo/public/cpp/bindings/tests/sample_service_unittest.cc

Issue 507173003: Change TypeConverter<X,Y>::ConvertFrom and ConvertTo into a single symmetric (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile for real Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/bindings/struct_ptr.h ('k') | mojo/public/cpp/bindings/tests/type_conversion_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/tests/sample_service_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/sample_service_unittest.cc b/mojo/public/cpp/bindings/tests/sample_service_unittest.cc
index e27512cbf68ec170a38450addcd939444de5cbc7..c64ee9a387551d72c69ad5550ccad3c5de043030 100644
--- a/mojo/public/cpp/bindings/tests/sample_service_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/sample_service_unittest.cc
@@ -14,9 +14,8 @@
namespace mojo {
template <>
-class TypeConverter<sample::BarPtr, int32_t> {
- public:
- static int32_t ConvertTo(const sample::BarPtr& bar) {
+struct TypeConverter<int32_t, sample::BarPtr> {
+ static int32_t Convert(const sample::BarPtr& bar) {
return static_cast<int32_t>(bar->alpha) << 16 |
static_cast<int32_t>(bar->beta) << 8 |
static_cast<int32_t>(bar->gamma);
« no previous file with comments | « mojo/public/cpp/bindings/struct_ptr.h ('k') | mojo/public/cpp/bindings/tests/type_conversion_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698