| Index: mojo/public/cpp/bindings/lib/validation_errors.h
|
| diff --git a/mojo/public/cpp/bindings/lib/validation_errors.h b/mojo/public/cpp/bindings/lib/validation_errors.h
|
| index 7636e391dad4414dfff7659a04e75c12e9dd1ff4..122418d9e3d2eee11b5a5d86c3f42a5f802e67d6 100644
|
| --- a/mojo/public/cpp/bindings/lib/validation_errors.h
|
| +++ b/mojo/public/cpp/bindings/lib/validation_errors.h
|
| @@ -89,6 +89,20 @@ MOJO_CPP_BINDINGS_EXPORT void ReportValidationErrorForMessage(
|
| ValidationError error,
|
| const char* description = nullptr);
|
|
|
| +// This class may be used by tests to suppress validation error logging. This is
|
| +// not thread-safe and must only be instantiated on the main thread with no
|
| +// other threads using Mojo bindings at the time of construction or destruction.
|
| +class MOJO_CPP_BINDINGS_EXPORT ScopedSuppressValidationErrorLoggingForTests {
|
| + public:
|
| + ScopedSuppressValidationErrorLoggingForTests();
|
| + ~ScopedSuppressValidationErrorLoggingForTests();
|
| +
|
| + private:
|
| + const bool was_suppressed_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ScopedSuppressValidationErrorLoggingForTests);
|
| +};
|
| +
|
| // Only used by validation tests and when there is only one thread doing message
|
| // validation.
|
| class MOJO_CPP_BINDINGS_EXPORT ValidationErrorObserverForTesting {
|
|
|