| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/public/cpp/bindings/lib/validation_errors.h" | 5 #include "mojo/public/cpp/bindings/lib/validation_errors.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "mojo/public/cpp/bindings/message.h" | 8 #include "mojo/public/cpp/bindings/message.h" |
| 9 | 9 |
| 10 namespace mojo { | 10 namespace mojo { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 case VALIDATION_ERROR_MESSAGE_HEADER_UNKNOWN_METHOD: | 48 case VALIDATION_ERROR_MESSAGE_HEADER_UNKNOWN_METHOD: |
| 49 return "VALIDATION_ERROR_MESSAGE_HEADER_UNKNOWN_METHOD"; | 49 return "VALIDATION_ERROR_MESSAGE_HEADER_UNKNOWN_METHOD"; |
| 50 case VALIDATION_ERROR_DIFFERENT_SIZED_ARRAYS_IN_MAP: | 50 case VALIDATION_ERROR_DIFFERENT_SIZED_ARRAYS_IN_MAP: |
| 51 return "VALIDATION_ERROR_DIFFERENT_SIZED_ARRAYS_IN_MAP"; | 51 return "VALIDATION_ERROR_DIFFERENT_SIZED_ARRAYS_IN_MAP"; |
| 52 case VALIDATION_ERROR_UNKNOWN_UNION_TAG: | 52 case VALIDATION_ERROR_UNKNOWN_UNION_TAG: |
| 53 return "VALIDATION_ERROR_UNKNOWN_UNION_TAG"; | 53 return "VALIDATION_ERROR_UNKNOWN_UNION_TAG"; |
| 54 case VALIDATION_ERROR_UNKNOWN_ENUM_VALUE: | 54 case VALIDATION_ERROR_UNKNOWN_ENUM_VALUE: |
| 55 return "VALIDATION_ERROR_UNKNOWN_ENUM_VALUE"; | 55 return "VALIDATION_ERROR_UNKNOWN_ENUM_VALUE"; |
| 56 case VALIDATION_ERROR_DESERIALIZATION_FAILED: | 56 case VALIDATION_ERROR_DESERIALIZATION_FAILED: |
| 57 return "VALIDATION_ERROR_DESERIALIZATION_FAILED"; | 57 return "VALIDATION_ERROR_DESERIALIZATION_FAILED"; |
| 58 case VALIDATION_ERROR_MAX_RECURSION_DEPTH: |
| 59 return "VALIDATION_ERROR_MAX_RECURSION_DEPTH"; |
| 58 } | 60 } |
| 59 | 61 |
| 60 return "Unknown error"; | 62 return "Unknown error"; |
| 61 } | 63 } |
| 62 | 64 |
| 63 void ReportValidationError(ValidationContext* context, | 65 void ReportValidationError(ValidationContext* context, |
| 64 ValidationError error, | 66 ValidationError error, |
| 65 const char* description) { | 67 const char* description) { |
| 66 if (g_validation_error_observer) { | 68 if (g_validation_error_observer) { |
| 67 g_validation_error_observer->set_last_error(error); | 69 g_validation_error_observer->set_last_error(error); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 } | 129 } |
| 128 | 130 |
| 129 SerializationWarningObserverForTesting:: | 131 SerializationWarningObserverForTesting:: |
| 130 ~SerializationWarningObserverForTesting() { | 132 ~SerializationWarningObserverForTesting() { |
| 131 DCHECK(g_serialization_warning_observer == this); | 133 DCHECK(g_serialization_warning_observer == this); |
| 132 g_serialization_warning_observer = nullptr; | 134 g_serialization_warning_observer = nullptr; |
| 133 } | 135 } |
| 134 | 136 |
| 135 } // namespace internal | 137 } // namespace internal |
| 136 } // namespace mojo | 138 } // namespace mojo |
| OLD | NEW |