| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "mojo/public/cpp/bindings/message_validator.h" | |
| 6 | |
| 7 namespace mojo { | |
| 8 namespace internal { | |
| 9 | |
| 10 ValidationError PassThroughValidator::Validate(const Message* message, | |
| 11 std::string* err) { | |
| 12 return ValidationError::NONE; | |
| 13 } | |
| 14 | |
| 15 ValidationError RunValidatorsOnMessage(const MessageValidatorList& validators, | |
| 16 const Message* message, | |
| 17 std::string* err) { | |
| 18 for (const auto& validator : validators) { | |
| 19 auto result = validator->Validate(message, err); | |
| 20 if (result != ValidationError::NONE) | |
| 21 return result; | |
| 22 } | |
| 23 | |
| 24 return ValidationError::NONE; | |
| 25 } | |
| 26 | |
| 27 } // namespace internal | |
| 28 } // namespace mojo | |
| OLD | NEW |