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

Side by Side Diff: base/logging.cc

Issue 2518253002: Move Partition Allocator into Chromium base. (Closed)
Patch Set: Move OOM_CRASH into its own, more specific header. Fixes Windows build. Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/logging.h" 5 #include "base/logging.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/debug/activity_tracker.h" 10 #include "base/debug/activity_tracker.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 13
14 #if defined(OS_WIN) 14 #if defined(OS_WIN)
15 #include <io.h> 15 #include <io.h>
16 #include <windows.h>
17 typedef HANDLE FileHandle; 16 typedef HANDLE FileHandle;
18 typedef HANDLE MutexHandle; 17 typedef HANDLE MutexHandle;
19 // Windows warns on using write(). It prefers _write(). 18 // Windows warns on using write(). It prefers _write().
20 #define write(fd, buf, count) _write(fd, buf, static_cast<unsigned int>(count)) 19 #define write(fd, buf, count) _write(fd, buf, static_cast<unsigned int>(count))
21 // Windows doesn't define STDERR_FILENO. Define it here. 20 // Windows doesn't define STDERR_FILENO. Define it here.
22 #define STDERR_FILENO 2 21 #define STDERR_FILENO 2
23 #elif defined(OS_MACOSX) 22 #elif defined(OS_MACOSX)
24 #include <asl.h> 23 #include <asl.h>
25 #include <CoreFoundation/CoreFoundation.h> 24 #include <CoreFoundation/CoreFoundation.h>
26 #include <mach/mach.h> 25 #include <mach/mach.h>
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 BASE_EXPORT void LogErrorNotReached(const char* file, int line) { 947 BASE_EXPORT void LogErrorNotReached(const char* file, int line) {
949 LogMessage(file, line, LOG_ERROR).stream() 948 LogMessage(file, line, LOG_ERROR).stream()
950 << "NOTREACHED() hit."; 949 << "NOTREACHED() hit.";
951 } 950 }
952 951
953 } // namespace logging 952 } // namespace logging
954 953
955 std::ostream& std::operator<<(std::ostream& out, const wchar_t* wstr) { 954 std::ostream& std::operator<<(std::ostream& out, const wchar_t* wstr) {
956 return out << (wstr ? base::WideToUTF8(wstr) : std::string()); 955 return out << (wstr ? base::WideToUTF8(wstr) : std::string());
957 } 956 }
OLDNEW
« base/allocator/oom.h ('K') | « base/logging.h ('k') | base/sys_byteorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698