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

Unified Diff: base/logging.h

Issue 7461141: Rename BASE_API to BASE_EXPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | « base/linux_util.h ('k') | base/logging_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/logging.h
===================================================================
--- base/logging.h (revision 95578)
+++ base/logging.h (working copy)
@@ -11,7 +11,7 @@
#include <cstring>
#include <sstream>
-#include "base/base_api.h"
+#include "base/base_export.h"
#include "base/basictypes.h"
#include "build/build_config.h"
@@ -193,11 +193,11 @@
// Implementation of the InitLogging() method declared below. We use a
// more-specific name so we can #define it above without affecting other code
// that has named stuff "InitLogging".
-BASE_API bool BaseInitLoggingImpl(const PathChar* log_file,
- LoggingDestination logging_dest,
- LogLockingState lock_log,
- OldFileDeletionState delete_old,
- DcheckState dcheck_state);
+BASE_EXPORT bool BaseInitLoggingImpl(const PathChar* log_file,
+ LoggingDestination logging_dest,
+ LogLockingState lock_log,
+ OldFileDeletionState delete_old,
+ DcheckState dcheck_state);
// Sets the log file name and other global logging state. Calling this function
// is recommended, and is normally done at the beginning of application init.
@@ -224,19 +224,19 @@
// up to level INFO) if this function is not called.
// Note that log messages for VLOG(x) are logged at level -x, so setting
// the min log level to negative values enables verbose logging.
-BASE_API void SetMinLogLevel(int level);
+BASE_EXPORT void SetMinLogLevel(int level);
// Gets the current log level.
-BASE_API int GetMinLogLevel();
+BASE_EXPORT int GetMinLogLevel();
// Gets the VLOG default verbosity level.
-BASE_API int GetVlogVerbosity();
+BASE_EXPORT int GetVlogVerbosity();
// Gets the current vlog level for the given file (usually taken from
// __FILE__).
// Note that |N| is the size *with* the null terminator.
-BASE_API int GetVlogLevelHelper(const char* file_start, size_t N);
+BASE_EXPORT int GetVlogLevelHelper(const char* file_start, size_t N);
template <size_t N>
int GetVlogLevel(const char (&file)[N]) {
@@ -247,27 +247,27 @@
// process and thread IDs default to off, the timestamp defaults to on.
// If this function is not called, logging defaults to writing the timestamp
// only.
-BASE_API void SetLogItems(bool enable_process_id, bool enable_thread_id,
- bool enable_timestamp, bool enable_tickcount);
+BASE_EXPORT void SetLogItems(bool enable_process_id, bool enable_thread_id,
+ bool enable_timestamp, bool enable_tickcount);
// Sets whether or not you'd like to see fatal debug messages popped up in
// a dialog box or not.
// Dialogs are not shown by default.
-BASE_API void SetShowErrorDialogs(bool enable_dialogs);
+BASE_EXPORT void SetShowErrorDialogs(bool enable_dialogs);
// Sets the Log Assert Handler that will be used to notify of check failures.
// The default handler shows a dialog box and then terminate the process,
// however clients can use this function to override with their own handling
// (e.g. a silent one for Unit Tests)
typedef void (*LogAssertHandlerFunction)(const std::string& str);
-BASE_API void SetLogAssertHandler(LogAssertHandlerFunction handler);
+BASE_EXPORT void SetLogAssertHandler(LogAssertHandlerFunction handler);
// Sets the Log Report Handler that will be used to notify of check failures
// in non-debug mode. The default handler shows a dialog box and continues
// the execution, however clients can use this function to override with their
// own handling.
typedef void (*LogReportHandlerFunction)(const std::string& str);
-BASE_API void SetLogReportHandler(LogReportHandlerFunction handler);
+BASE_EXPORT void SetLogReportHandler(LogReportHandlerFunction handler);
// Sets the Log Message Handler that gets passed every log message before
// it's sent to other log destinations (if any).
@@ -275,8 +275,8 @@
// should not be sent to other log destinations.
typedef bool (*LogMessageHandlerFunction)(int severity,
const char* file, int line, size_t message_start, const std::string& str);
-BASE_API void SetLogMessageHandler(LogMessageHandlerFunction handler);
-BASE_API LogMessageHandlerFunction GetLogMessageHandler();
+BASE_EXPORT void SetLogMessageHandler(LogMessageHandlerFunction handler);
+BASE_EXPORT LogMessageHandlerFunction GetLogMessageHandler();
typedef int LogSeverity;
const LogSeverity LOG_VERBOSE = -1; // This is level 1 verbosity
@@ -623,7 +623,7 @@
COMPACT_GOOGLE_LOG_EX_ERROR_REPORT(ClassName , ##__VA_ARGS__)
#define COMPACT_GOOGLE_LOG_DCHECK COMPACT_GOOGLE_LOG_ERROR_REPORT
const LogSeverity LOG_DCHECK = LOG_ERROR_REPORT;
-BASE_API extern DcheckState g_dcheck_state;
+BASE_EXPORT extern DcheckState g_dcheck_state;
#define DCHECK_IS_ON() \
((::logging::g_dcheck_state == \
::logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS) && \
@@ -722,7 +722,7 @@
// You shouldn't actually use LogMessage's constructor to log things,
// though. You should use the LOG() macro (and variants thereof)
// above.
-class BASE_API LogMessage {
+class BASE_EXPORT LogMessage {
public:
LogMessage(const char* file, int line, LogSeverity severity, int ctr);
@@ -816,11 +816,11 @@
// Alias for ::GetLastError() on Windows and errno on POSIX. Avoids having to
// pull in windows.h just for GetLastError() and DWORD.
-BASE_API SystemErrorCode GetLastSystemErrorCode();
+BASE_EXPORT SystemErrorCode GetLastSystemErrorCode();
#if defined(OS_WIN)
// Appends a formatted system message of the GetLastError() type.
-class BASE_API Win32ErrorLogMessage {
+class BASE_EXPORT Win32ErrorLogMessage {
public:
Win32ErrorLogMessage(const char* file,
int line,
@@ -848,7 +848,7 @@
};
#elif defined(OS_POSIX)
// Appends a formatted system message of the errno type
-class BASE_API ErrnoLogMessage {
+class BASE_EXPORT ErrnoLogMessage {
public:
ErrnoLogMessage(const char* file,
int line,
@@ -872,10 +872,10 @@
// NOTE: Since the log file is opened as necessary by the action of logging
// statements, there's no guarantee that it will stay closed
// after this call.
-BASE_API void CloseLogFile();
+BASE_EXPORT void CloseLogFile();
// Async signal safe logging mechanism.
-BASE_API void RawLog(int level, const char* message);
+BASE_EXPORT void RawLog(int level, const char* message);
#define RAW_LOG(level, message) logging::RawLog(logging::LOG_ ## level, message)
@@ -893,7 +893,7 @@
// which is normally ASCII. It is relatively slow, so try not to use it for
// common cases. Non-ASCII characters will be converted to UTF-8 by these
// operators.
-BASE_API std::ostream& operator<<(std::ostream& out, const wchar_t* wstr);
+BASE_EXPORT std::ostream& operator<<(std::ostream& out, const wchar_t* wstr);
inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) {
return out << wstr.c_str();
}
@@ -945,7 +945,7 @@
class StringPiece;
// Allows StringPiece to be logged.
-BASE_API std::ostream& operator<<(std::ostream& o, const StringPiece& piece);
+BASE_EXPORT std::ostream& operator<<(std::ostream& o, const StringPiece& piece);
} // namespace base
« no previous file with comments | « base/linux_util.h ('k') | base/logging_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698