| OLD | NEW | 
|   1 // Copyright 2013 The Chromium Authors. All rights reserved. |   1 // Copyright 2013 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_COMMON_COMMON_TYPE_CONVERTERS_H_ |   5 #ifndef MOJO_COMMON_COMMON_TYPE_CONVERTERS_H_ | 
|   6 #define MOJO_COMMON_COMMON_TYPE_CONVERTERS_H_ |   6 #define MOJO_COMMON_COMMON_TYPE_CONVERTERS_H_ | 
|   7  |   7  | 
|   8 #include <stdint.h> |   8 #include <stdint.h> | 
|   9  |   9  | 
|  10 #include "base/strings/string16.h" |  10 #include "base/strings/string16.h" | 
| (...skipping 29 matching lines...) Expand all  Loading... | 
|  40 struct MOJO_COMMON_EXPORT TypeConverter<std::string, Array<uint8_t>> { |  40 struct MOJO_COMMON_EXPORT TypeConverter<std::string, Array<uint8_t>> { | 
|  41   static std::string Convert(const Array<uint8_t>& input); |  41   static std::string Convert(const Array<uint8_t>& input); | 
|  42 }; |  42 }; | 
|  43  |  43  | 
|  44 template <> |  44 template <> | 
|  45 struct MOJO_COMMON_EXPORT TypeConverter<Array<uint8_t>, std::string> { |  45 struct MOJO_COMMON_EXPORT TypeConverter<Array<uint8_t>, std::string> { | 
|  46   static Array<uint8_t> Convert(const std::string& input); |  46   static Array<uint8_t> Convert(const std::string& input); | 
|  47 }; |  47 }; | 
|  48  |  48  | 
|  49 template <> |  49 template <> | 
 |  50 struct MOJO_COMMON_EXPORT TypeConverter<Array<uint8_t>, base::StringPiece> { | 
 |  51   static Array<uint8_t> Convert(const base::StringPiece& input); | 
 |  52 }; | 
 |  53  | 
 |  54 template <> | 
|  50 struct MOJO_COMMON_EXPORT TypeConverter<base::string16, Array<uint8_t>> { |  55 struct MOJO_COMMON_EXPORT TypeConverter<base::string16, Array<uint8_t>> { | 
|  51   static base::string16 Convert(const Array<uint8_t>& input); |  56   static base::string16 Convert(const Array<uint8_t>& input); | 
|  52 }; |  57 }; | 
|  53  |  58  | 
|  54 template <> |  59 template <> | 
|  55 struct MOJO_COMMON_EXPORT TypeConverter<Array<uint8_t>, base::string16> { |  60 struct MOJO_COMMON_EXPORT TypeConverter<Array<uint8_t>, base::string16> { | 
|  56   static Array<uint8_t> Convert(const base::string16& input); |  61   static Array<uint8_t> Convert(const base::string16& input); | 
|  57 }; |  62 }; | 
|  58  |  63  | 
|  59 }  // namespace mojo |  64 }  // namespace mojo | 
|  60  |  65  | 
|  61 #endif  // MOJO_COMMON_COMMON_TYPE_CONVERTERS_H_ |  66 #endif  // MOJO_COMMON_COMMON_TYPE_CONVERTERS_H_ | 
| OLD | NEW |