mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Remove DISALLOW_ macro from include/ (see issue #3234)
Also perform related C++ cleanup: - Use =default instead of {} for default implementations of constructors/destructors. - Replace typedef with using.
This commit is contained in:
@ -164,7 +164,6 @@
|
||||
#include <string>
|
||||
|
||||
#include "include/base/cef_build.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/internal/cef_logging_internal.h"
|
||||
|
||||
namespace cef {
|
||||
@ -202,21 +201,21 @@ const LogSeverity LOG_DFATAL = LOG_FATAL;
|
||||
// A few definitions of macros that don't generate much code. These are used
|
||||
// by LOG() and LOG_IF, etc. Since these are used all over our code, it's
|
||||
// better to have compact code for these operations.
|
||||
#define COMPACT_GOOGLE_LOG_EX_INFO(ClassName, ...) \
|
||||
#define COMPACT_GOOGLE_LOG_EX_INFO(ClassName, ...) \
|
||||
::cef::logging::ClassName(__FILE__, __LINE__, ::cef::logging::LOG_INFO, \
|
||||
##__VA_ARGS__)
|
||||
#define COMPACT_GOOGLE_LOG_EX_WARNING(ClassName, ...) \
|
||||
##__VA_ARGS__)
|
||||
#define COMPACT_GOOGLE_LOG_EX_WARNING(ClassName, ...) \
|
||||
::cef::logging::ClassName(__FILE__, __LINE__, ::cef::logging::LOG_WARNING, \
|
||||
##__VA_ARGS__)
|
||||
#define COMPACT_GOOGLE_LOG_EX_ERROR(ClassName, ...) \
|
||||
##__VA_ARGS__)
|
||||
#define COMPACT_GOOGLE_LOG_EX_ERROR(ClassName, ...) \
|
||||
::cef::logging::ClassName(__FILE__, __LINE__, ::cef::logging::LOG_ERROR, \
|
||||
##__VA_ARGS__)
|
||||
#define COMPACT_GOOGLE_LOG_EX_FATAL(ClassName, ...) \
|
||||
##__VA_ARGS__)
|
||||
#define COMPACT_GOOGLE_LOG_EX_FATAL(ClassName, ...) \
|
||||
::cef::logging::ClassName(__FILE__, __LINE__, ::cef::logging::LOG_FATAL, \
|
||||
##__VA_ARGS__)
|
||||
#define COMPACT_GOOGLE_LOG_EX_DFATAL(ClassName, ...) \
|
||||
##__VA_ARGS__)
|
||||
#define COMPACT_GOOGLE_LOG_EX_DFATAL(ClassName, ...) \
|
||||
::cef::logging::ClassName(__FILE__, __LINE__, ::cef::logging::LOG_DFATAL, \
|
||||
##__VA_ARGS__)
|
||||
##__VA_ARGS__)
|
||||
|
||||
#define COMPACT_GOOGLE_LOG_INFO COMPACT_GOOGLE_LOG_EX_INFO(LogMessage)
|
||||
#define COMPACT_GOOGLE_LOG_WARNING COMPACT_GOOGLE_LOG_EX_WARNING(LogMessage)
|
||||
@ -583,6 +582,9 @@ class LogMessage {
|
||||
LogSeverity severity,
|
||||
std::string* result);
|
||||
|
||||
LogMessage(const LogMessage&) = delete;
|
||||
LogMessage& operator=(const LogMessage&) = delete;
|
||||
|
||||
~LogMessage();
|
||||
|
||||
std::ostream& stream() { return stream_; }
|
||||
@ -614,8 +616,6 @@ class LogMessage {
|
||||
|
||||
SaveLastError last_error_;
|
||||
#endif
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(LogMessage);
|
||||
};
|
||||
|
||||
// A non-macro interface to the log facility; (useful
|
||||
@ -655,6 +655,9 @@ class Win32ErrorLogMessage {
|
||||
LogSeverity severity,
|
||||
SystemErrorCode err);
|
||||
|
||||
Win32ErrorLogMessage(const Win32ErrorLogMessage&) = delete;
|
||||
Win32ErrorLogMessage& operator=(const Win32ErrorLogMessage&) = delete;
|
||||
|
||||
// Appends the error message before destructing the encapsulated class.
|
||||
~Win32ErrorLogMessage();
|
||||
|
||||
@ -663,8 +666,6 @@ class Win32ErrorLogMessage {
|
||||
private:
|
||||
SystemErrorCode err_;
|
||||
LogMessage log_message_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Win32ErrorLogMessage);
|
||||
};
|
||||
#elif defined(OS_POSIX)
|
||||
// Appends a formatted system message of the errno type
|
||||
@ -675,6 +676,9 @@ class ErrnoLogMessage {
|
||||
LogSeverity severity,
|
||||
SystemErrorCode err);
|
||||
|
||||
ErrnoLogMessage(const ErrnoLogMessage&) = delete;
|
||||
ErrnoLogMessage& operator=(const ErrnoLogMessage&) = delete;
|
||||
|
||||
// Appends the error message before destructing the encapsulated class.
|
||||
~ErrnoLogMessage();
|
||||
|
||||
@ -683,8 +687,6 @@ class ErrnoLogMessage {
|
||||
private:
|
||||
SystemErrorCode err_;
|
||||
LogMessage log_message_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ErrnoLogMessage);
|
||||
};
|
||||
#endif // OS_WIN
|
||||
|
||||
|
Reference in New Issue
Block a user