#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include <string>
#include "base/metrics/histogram_functions.h"
#include "base/strings/stringprintf.h"
#include "build/build_config.h"
#include "mojo/public/cpp/bindings/lib/validation_context.h"
#include "mojo/public/cpp/bindings/message.h"
#if !BUILDFLAG(IS_NACL)
#include "base/debug/crash_logging.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#endif
namespace mojo {
namespace internal {
namespace {
ValidationErrorObserverForTesting* g_validation_error_observer = …;
SerializationWarningObserverForTesting* g_serialization_warning_observer = …;
bool g_suppress_logging = …;
#if !BUILDFLAG(IS_NACL)
std::string MessageHeaderAsHexString(Message* message) { … }
#endif
}
const char* ValidationErrorToString(ValidationError error) { … }
void ReportValidationError(ValidationContext* context,
ValidationError error,
const char* description) { … }
void ReportValidationErrorForMessage(mojo::Message* message,
ValidationError error,
const char* interface_name,
unsigned int method_ordinal,
bool is_response) { … }
ScopedSuppressValidationErrorLoggingForTests
::ScopedSuppressValidationErrorLoggingForTests()
: … { … }
ScopedSuppressValidationErrorLoggingForTests
::~ScopedSuppressValidationErrorLoggingForTests() { … }
ValidationErrorObserverForTesting::ValidationErrorObserverForTesting(
base::RepeatingClosure callback)
: … { … }
ValidationErrorObserverForTesting::~ValidationErrorObserverForTesting() { … }
bool ReportSerializationWarning(ValidationError error) { … }
SerializationWarningObserverForTesting::SerializationWarningObserverForTesting()
: … { … }
SerializationWarningObserverForTesting::
~SerializationWarningObserverForTesting() { … }
void RecordInvalidStringDeserialization() { … }
}
}