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/message_header_validator.h" | 5 #include "mojo/public/cpp/bindings/lib/message_header_validator.h" |
6 | 6 |
7 #include "mojo/public/cpp/bindings/lib/bounds_checker.h" | 7 #include "mojo/public/cpp/bindings/lib/bounds_checker.h" |
| 8 #include "mojo/public/cpp/bindings/lib/message_validation.h" |
8 #include "mojo/public/cpp/bindings/lib/validation_errors.h" | 9 #include "mojo/public/cpp/bindings/lib/validation_errors.h" |
9 #include "mojo/public/cpp/bindings/lib/validation_util.h" | 10 #include "mojo/public/cpp/bindings/lib/validation_util.h" |
10 #include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h" | 11 #include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h" |
11 | 12 |
12 namespace mojo { | 13 namespace mojo { |
13 namespace internal { | 14 namespace internal { |
14 namespace { | 15 namespace { |
15 | 16 |
16 bool IsValidMessageHeader(const MessageHeader* header) { | 17 bool IsValidMessageHeader(const MessageHeader* header) { |
17 // NOTE: Our goal is to preserve support for future extension of the message | 18 // NOTE: Our goal is to preserve support for future extension of the message |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 return false; | 92 return false; |
92 switch (message->header()->name) { | 93 switch (message->header()->name) { |
93 case kRunMessageId: | 94 case kRunMessageId: |
94 return ValidateMessagePayload<RunResponseMessageParams_Data>(message); | 95 return ValidateMessagePayload<RunResponseMessageParams_Data>(message); |
95 } | 96 } |
96 return false; | 97 return false; |
97 } | 98 } |
98 | 99 |
99 } // namespace internal | 100 } // namespace internal |
100 } // namespace mojo | 101 } // namespace mojo |
OLD | NEW |