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

Side by Side Diff: base/logging.cc

Issue 2001783002: base: Support using (D)CHECK on scoped enums. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use CR_GLIBCXX_4_7_0 macro, since I bothered to define it Created 4 years, 6 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 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/macros.h" 10 #include "base/macros.h"
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 const int&, const int&, const char* names); 447 const int&, const int&, const char* names);
448 template std::string* MakeCheckOpString<unsigned long, unsigned long>( 448 template std::string* MakeCheckOpString<unsigned long, unsigned long>(
449 const unsigned long&, const unsigned long&, const char* names); 449 const unsigned long&, const unsigned long&, const char* names);
450 template std::string* MakeCheckOpString<unsigned long, unsigned int>( 450 template std::string* MakeCheckOpString<unsigned long, unsigned int>(
451 const unsigned long&, const unsigned int&, const char* names); 451 const unsigned long&, const unsigned int&, const char* names);
452 template std::string* MakeCheckOpString<unsigned int, unsigned long>( 452 template std::string* MakeCheckOpString<unsigned int, unsigned long>(
453 const unsigned int&, const unsigned long&, const char* names); 453 const unsigned int&, const unsigned long&, const char* names);
454 template std::string* MakeCheckOpString<std::string, std::string>( 454 template std::string* MakeCheckOpString<std::string, std::string>(
455 const std::string&, const std::string&, const char* name); 455 const std::string&, const std::string&, const char* name);
456 456
457 template <> 457 void MakeCheckOpValueString(std::ostream* os, std::nullptr_t p) {
458 void MakeCheckOpValueString(std::ostream* os, const std::nullptr_t& p) {
459 (*os) << "nullptr"; 458 (*os) << "nullptr";
460 } 459 }
461 460
462 #if !defined(NDEBUG) 461 #if !defined(NDEBUG)
463 // Displays a message box to the user with the error message in it. 462 // Displays a message box to the user with the error message in it.
464 // Used for fatal messages, where we close the app simultaneously. 463 // Used for fatal messages, where we close the app simultaneously.
465 // This is for developers only; we don't use this in circumstances 464 // This is for developers only; we don't use this in circumstances
466 // (like release builds) where users could see it, since users don't 465 // (like release builds) where users could see it, since users don't
467 // understand these messages anyway. 466 // understand these messages anyway.
468 void DisplayDebugMessageInDialog(const std::string& str) { 467 void DisplayDebugMessageInDialog(const std::string& str) {
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 BASE_EXPORT void LogErrorNotReached(const char* file, int line) { 912 BASE_EXPORT void LogErrorNotReached(const char* file, int line) {
914 LogMessage(file, line, LOG_ERROR).stream() 913 LogMessage(file, line, LOG_ERROR).stream()
915 << "NOTREACHED() hit."; 914 << "NOTREACHED() hit.";
916 } 915 }
917 916
918 } // namespace logging 917 } // namespace logging
919 918
920 std::ostream& std::operator<<(std::ostream& out, const wchar_t* wstr) { 919 std::ostream& std::operator<<(std::ostream& out, const wchar_t* wstr) {
921 return out << (wstr ? base::WideToUTF8(wstr) : std::string()); 920 return out << (wstr ? base::WideToUTF8(wstr) : std::string());
922 } 921 }
OLDNEW
« base/logging.h ('K') | « base/logging.h ('k') | base/logging_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698