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

Unified Diff: mojo/public/cpp/bindings/lib/message_validation.h

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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/cpp/bindings/lib/message_validation.h
diff --git a/mojo/public/cpp/bindings/lib/validation_util.h b/mojo/public/cpp/bindings/lib/message_validation.h
similarity index 54%
copy from mojo/public/cpp/bindings/lib/validation_util.h
copy to mojo/public/cpp/bindings/lib/message_validation.h
index 1b80a5b19fa8987470b25e64596df630f28f1200..73e32bd97591bd78363ce06fb7b7c96188d18cca 100644
--- a/mojo/public/cpp/bindings/lib/validation_util.h
+++ b/mojo/public/cpp/bindings/lib/message_validation.h
@@ -2,10 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_VALIDATION_UTIL_H_
-#define MOJO_PUBLIC_CPP_BINDINGS_LIB_VALIDATION_UTIL_H_
-
-#include <stdint.h>
+#ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_VALIDATION_H_
+#define MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_VALIDATION_H_
#include "mojo/public/cpp/bindings/lib/bounds_checker.h"
#include "mojo/public/cpp/bindings/message.h"
@@ -13,20 +11,6 @@
namespace mojo {
namespace internal {
-// Checks whether decoding the pointer will overflow and produce a pointer
-// smaller than |offset|.
-bool ValidateEncodedPointer(const uint64_t* offset);
-
-// Validates that |data| contains a valid struct header, in terms of alignment
-// and size (i.e., the |num_bytes| field of the header is sufficient for storing
-// the header itself). Besides, it checks that the memory range
-// [data, data + num_bytes) is not marked as occupied by other objects in
-// |bounds_checker|. On success, the memory range is marked as occupied.
-// Note: Does not verify |version| or that |num_bytes| is correct for the
-// claimed version.
-bool ValidateStructHeaderAndClaimMemory(const void* data,
- BoundsChecker* bounds_checker);
-
// Validates that the message is a request which doesn't expect a response.
bool ValidateMessageIsRequestWithoutResponse(const Message* message);
// Validates that the message is a request expecting a response.
@@ -45,4 +29,4 @@ bool ValidateMessagePayload(const Message* message) {
} // namespace internal
} // namespace mojo
-#endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_VALIDATION_UTIL_H_
+#endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_VALIDATION_H_
« no previous file with comments | « mojo/public/cpp/bindings/lib/message_header_validator.cc ('k') | mojo/public/cpp/bindings/lib/message_validation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698