summaryrefslogtreecommitdiffstats
path: root/base/logging.h
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-07 18:31:40 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-07 18:31:40 +0000
commit39be42426e89c7739555e45099c5326a3c525b8c (patch)
tree6a81b59079a58ba7f9c79c8253194a1fdf3901b0 /base/logging.h
parenta6b4a185656b7b16d965e5ff0e469658c424e85d (diff)
downloadchromium_src-39be42426e89c7739555e45099c5326a3c525b8c.zip
chromium_src-39be42426e89c7739555e45099c5326a3c525b8c.tar.gz
chromium_src-39be42426e89c7739555e45099c5326a3c525b8c.tar.bz2
Add defines for the size of wchar_t to build_config.h. Use this in places where we currently have an OS-specific check.
Remove all WIN32 ifdefs from base and replace them with proper defined(OS...). I also fixed random style bits when I encountered them. I made major style fixes to string16. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@524 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/logging.h')
-rw-r--r--base/logging.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/base/logging.h b/base/logging.h
index 40c176f..6bfb34e 100644
--- a/base/logging.h
+++ b/base/logging.h
@@ -27,8 +27,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef BASE_LOGGING_H__
-#define BASE_LOGGING_H__
+#ifndef BASE_LOGGING_H_
+#define BASE_LOGGING_H_
#include <string>
#include <cstring>
@@ -143,10 +143,10 @@ enum OldFileDeletionState { DELETE_OLD_LOG_FILE, APPEND_TO_OLD_LOG_FILE };
// The default log file is initialized to "debug.log" in the application
// directory. You probably don't want this, especially since the program
// directory may not be writable on an enduser's system.
-#if defined(WIN32)
+#if defined(OS_WIN)
void InitLogging(const wchar_t* log_file, LoggingDestination logging_dest,
LogLockingState lock_log, OldFileDeletionState delete_old);
-#else
+#elif defined(OS_POSIX)
// TODO(avi): do we want to do a unification of character types here?
void InitLogging(const char* log_file, LoggingDestination logging_dest,
LogLockingState lock_log, OldFileDeletionState delete_old);
@@ -483,7 +483,7 @@ class LogMessage {
size_t message_start_; // Offset of the start of the message (past prefix
// info).
- DISALLOW_EVIL_CONSTRUCTORS(LogMessage);
+ DISALLOW_COPY_AND_ASSIGN(LogMessage);
};
// A non-macro interface to the log facility; (useful
@@ -509,16 +509,17 @@ class LogMessageVoidify {
// after this call.
void CloseLogFile();
-} // namespace Logging
+} // namespace logging
// These functions are provided as a convenience for logging, which is where we
// use streams (it is against Google style to use streams in other places). It
// is designed to allow you to emit non-ASCII Unicode strings to the log file,
// 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.
+// common cases. Non-ASCII characters will be converted to UTF-8 by these
+// operators.
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();
}
-#endif // BASE_LOGGING_H__
+#endif // BASE_LOGGING_H_