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

Unified Diff: mojo/public/cpp/bindings/lib/validation_util.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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/cpp/bindings/lib/validation_util.cc
diff --git a/mojo/public/cpp/bindings/lib/validation_util.cc b/mojo/public/cpp/bindings/lib/validation_util.cc
index 23b712a1e01beca6240016b2a0d4d9a395fc62d0..4ceefaab5a8c80aef0d693256d62c780a724ae20 100644
--- a/mojo/public/cpp/bindings/lib/validation_util.cc
+++ b/mojo/public/cpp/bindings/lib/validation_util.cc
@@ -7,7 +7,6 @@
#include <limits>
#include "mojo/public/cpp/bindings/lib/bindings_serialization.h"
-#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
namespace mojo {
@@ -49,32 +48,5 @@ bool ValidateStructHeaderAndClaimMemory(const void* data,
return true;
}
-bool ValidateMessageIsRequestWithoutResponse(const Message* message) {
- if (message->has_flag(kMessageIsResponse) ||
- message->has_flag(kMessageExpectsResponse)) {
- ReportValidationError(VALIDATION_ERROR_MESSAGE_HEADER_INVALID_FLAGS);
- return false;
- }
- return true;
-}
-
-bool ValidateMessageIsRequestExpectingResponse(const Message* message) {
- if (message->has_flag(kMessageIsResponse) ||
- !message->has_flag(kMessageExpectsResponse)) {
- ReportValidationError(VALIDATION_ERROR_MESSAGE_HEADER_INVALID_FLAGS);
- return false;
- }
- return true;
-}
-
-bool ValidateMessageIsResponse(const Message* message) {
- if (message->has_flag(kMessageExpectsResponse) ||
- !message->has_flag(kMessageIsResponse)) {
- ReportValidationError(VALIDATION_ERROR_MESSAGE_HEADER_INVALID_FLAGS);
- return false;
- }
- return true;
-}
-
} // namespace internal
} // namespace mojo
« no previous file with comments | « mojo/public/cpp/bindings/lib/validation_util.h ('k') | mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698