| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <io.h> | 8 #include <io.h> |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 typedef HANDLE FileHandle; | 10 typedef HANDLE FileHandle; |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 } | 413 } |
| 414 | 414 |
| 415 void SetLogReportHandler(LogReportHandlerFunction handler) { | 415 void SetLogReportHandler(LogReportHandlerFunction handler) { |
| 416 log_report_handler = handler; | 416 log_report_handler = handler; |
| 417 } | 417 } |
| 418 | 418 |
| 419 void SetLogMessageHandler(LogMessageHandlerFunction handler) { | 419 void SetLogMessageHandler(LogMessageHandlerFunction handler) { |
| 420 log_message_handler = handler; | 420 log_message_handler = handler; |
| 421 } | 421 } |
| 422 | 422 |
| 423 LogMessageHandlerFunction GetLogMessageHandler() { |
| 424 return log_message_handler; |
| 425 } |
| 426 |
| 423 // MSVC doesn't like complex extern templates and DLLs. | 427 // MSVC doesn't like complex extern templates and DLLs. |
| 424 #if !defined(COMPILER_MSVC) | 428 #if !defined(COMPILER_MSVC) |
| 425 // Explicit instantiations for commonly used comparisons. | 429 // Explicit instantiations for commonly used comparisons. |
| 426 template std::string* MakeCheckOpString<int, int>( | 430 template std::string* MakeCheckOpString<int, int>( |
| 427 const int&, const int&, const char* names); | 431 const int&, const int&, const char* names); |
| 428 template std::string* MakeCheckOpString<unsigned long, unsigned long>( | 432 template std::string* MakeCheckOpString<unsigned long, unsigned long>( |
| 429 const unsigned long&, const unsigned long&, const char* names); | 433 const unsigned long&, const unsigned long&, const char* names); |
| 430 template std::string* MakeCheckOpString<unsigned long, unsigned int>( | 434 template std::string* MakeCheckOpString<unsigned long, unsigned int>( |
| 431 const unsigned long&, const unsigned int&, const char* names); | 435 const unsigned long&, const unsigned int&, const char* names); |
| 432 template std::string* MakeCheckOpString<unsigned int, unsigned long>( | 436 template std::string* MakeCheckOpString<unsigned int, unsigned long>( |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 | 798 |
| 795 if (level == LOG_FATAL) | 799 if (level == LOG_FATAL) |
| 796 base::debug::BreakDebugger(); | 800 base::debug::BreakDebugger(); |
| 797 } | 801 } |
| 798 | 802 |
| 799 } // namespace logging | 803 } // namespace logging |
| 800 | 804 |
| 801 std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) { | 805 std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) { |
| 802 return out << WideToUTF8(std::wstring(wstr)); | 806 return out << WideToUTF8(std::wstring(wstr)); |
| 803 } | 807 } |
| OLD | NEW |