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

Side by Side Diff: base/logging.cc

Issue 4390001: Fix the testing::LogDisabler for the change r64883. See http://codereview.chr... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « base/logging.h ('k') | ceee/testing/utils/test_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « base/logging.h ('k') | ceee/testing/utils/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698