| OLD | NEW |
| 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 #include "components/translate/content/common/translate_struct_traits.h" | 5 #include "components/translate/content/common/translate_struct_traits.h" |
| 6 | 6 |
| 7 #include "ipc/ipc_message_utils.h" | 7 #include "ipc/ipc_message_utils.h" |
| 8 #include "mojo/common/common_custom_types_struct_traits.h" |
| 8 #include "url/mojo/url_gurl_struct_traits.h" | 9 #include "url/mojo/url_gurl_struct_traits.h" |
| 9 | 10 |
| 10 using namespace translate; | 11 using namespace translate; |
| 11 | 12 |
| 12 namespace mojo { | 13 namespace mojo { |
| 13 | 14 |
| 14 mojom::TranslateError | 15 mojom::TranslateError |
| 15 EnumTraits<mojom::TranslateError, TranslateErrors::Type>::ToMojom( | 16 EnumTraits<mojom::TranslateError, TranslateErrors::Type>::ToMojom( |
| 16 TranslateErrors::Type input) { | 17 TranslateErrors::Type input) { |
| 17 switch (input) { | 18 switch (input) { |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 return false; | 113 return false; |
| 113 if (!data.ReadAdoptedLanguage(&out->adopted_language)) | 114 if (!data.ReadAdoptedLanguage(&out->adopted_language)) |
| 114 return false; | 115 return false; |
| 115 if (!data.ReadContents(&out->contents)) | 116 if (!data.ReadContents(&out->contents)) |
| 116 return false; | 117 return false; |
| 117 | 118 |
| 118 return true; | 119 return true; |
| 119 } | 120 } |
| 120 | 121 |
| 121 } // namespace mojo | 122 } // namespace mojo |
| OLD | NEW |