Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: mojo/public/cpp/bindings/lib/message_header_validator.cc

Issue 1412733002: C++ bindings: separate out serialization source set, have "mojom" targets optionally use serializat… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: address comments from previous patch Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/bindings_serialization.h ('k') | mojo/public/cpp/bindings/lib/message_validation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698