| Index: base/test/logging_utils.h
|
| diff --git a/base/test/logging_utils.h b/base/test/logging_utils.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ee12446e0181cef6ab5cf44314615e76caf57a7c
|
| --- /dev/null
|
| +++ b/base/test/logging_utils.h
|
| @@ -0,0 +1,33 @@
|
| +// Copyright 2017 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 BASE_TEST_LOGGING_UTILS_H_
|
| +#define BASE_TEST_LOGGING_UTILS_H_
|
| +
|
| +#include "base/base_export.h"
|
| +#include "base/callback.h"
|
| +#include "base/logging.h"
|
| +#include "base/macros.h"
|
| +
|
| +namespace logging {
|
| +
|
| +// Scoped object to set and restore Log Assert handler.
|
| +BASE_EXPORT class ScopedLogAssertHandler {
|
| + public:
|
| + ScopedLogAssertHandler();
|
| + explicit ScopedLogAssertHandler(LogAssertHandlerFunction handler);
|
| + ScopedLogAssertHandler(ScopedLogAssertHandler&& other);
|
| + ~ScopedLogAssertHandler();
|
| +
|
| + ScopedLogAssertHandler& operator=(ScopedLogAssertHandler&& other);
|
| +
|
| + private:
|
| + LogAssertHandlerFunction handler_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ScopedLogAssertHandler);
|
| +};
|
| +
|
| +} // namespace logging
|
| +
|
| +#endif // BASE_TEST_LOGGING_UTILS_H_
|
|
|