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

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

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « mojo/public/cpp/bindings/lib/message_internal.h ('k') | mojo/public/cpp/bindings/lib/message_validation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/message_validation.h
diff --git a/mojo/public/cpp/bindings/lib/message_validation.h b/mojo/public/cpp/bindings/lib/message_validation.h
deleted file mode 100644
index 2f25647c584379941b53937676b5f810cf142cf5..0000000000000000000000000000000000000000
--- a/mojo/public/cpp/bindings/lib/message_validation.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// 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_MESSAGE_VALIDATION_H_
-#define MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_VALIDATION_H_
-
-#include <string>
-
-#include "mojo/public/cpp/bindings/lib/bounds_checker.h"
-#include "mojo/public/cpp/bindings/lib/validation_errors.h"
-#include "mojo/public/cpp/bindings/message.h"
-
-namespace mojo {
-namespace internal {
-
-// Validates that the message is a request which doesn't expect a response.
-ValidationError ValidateMessageIsRequestWithoutResponse(const Message* message,
- std::string* err);
-// Validates that the message is a request expecting a response.
-ValidationError ValidateMessageIsRequestExpectingResponse(
- const Message* message,
- std::string* err);
-// Validates that the message is a response.
-ValidationError ValidateMessageIsResponse(const Message* message,
- std::string* err);
-
-// Validates that the message payload is a valid struct of type ParamsType.
-template <typename ParamsType>
-ValidationError ValidateMessagePayload(const Message* message,
- std::string* err) {
- BoundsChecker bounds_checker(message->payload(), message->payload_num_bytes(),
- message->handles()->size());
- return ParamsType::Validate(message->payload(), &bounds_checker, err);
-}
-
-} // namespace internal
-} // namespace mojo
-
-#endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_VALIDATION_H_
« no previous file with comments | « mojo/public/cpp/bindings/lib/message_internal.h ('k') | mojo/public/cpp/bindings/lib/message_validation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698