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

Side by Side Diff: base/logging.h

Issue 7238012: Upstream android debug and log related files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove the android guard around ctype.h Created 9 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « base/debug/stack_trace_android.cc ('k') | base/logging.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef BASE_LOGGING_H_ 5 #ifndef BASE_LOGGING_H_
6 #define BASE_LOGGING_H_ 6 #define BASE_LOGGING_H_
7 #pragma once 7 #pragma once
8 8
9 #include <cassert> 9 #include <cassert>
10 #include <string> 10 #include <string>
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 // and the other is NULL. To work around this, simply static_cast NULL to the 696 // and the other is NULL. To work around this, simply static_cast NULL to the
697 // type of the desired pointer. 697 // type of the desired pointer.
698 698
699 #define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2) 699 #define DCHECK_EQ(val1, val2) DCHECK_OP(EQ, ==, val1, val2)
700 #define DCHECK_NE(val1, val2) DCHECK_OP(NE, !=, val1, val2) 700 #define DCHECK_NE(val1, val2) DCHECK_OP(NE, !=, val1, val2)
701 #define DCHECK_LE(val1, val2) DCHECK_OP(LE, <=, val1, val2) 701 #define DCHECK_LE(val1, val2) DCHECK_OP(LE, <=, val1, val2)
702 #define DCHECK_LT(val1, val2) DCHECK_OP(LT, < , val1, val2) 702 #define DCHECK_LT(val1, val2) DCHECK_OP(LT, < , val1, val2)
703 #define DCHECK_GE(val1, val2) DCHECK_OP(GE, >=, val1, val2) 703 #define DCHECK_GE(val1, val2) DCHECK_OP(GE, >=, val1, val2)
704 #define DCHECK_GT(val1, val2) DCHECK_OP(GT, > , val1, val2) 704 #define DCHECK_GT(val1, val2) DCHECK_OP(GT, > , val1, val2)
705 705
706 #if defined(OS_ANDROID) && !defined(OFFICIAL_BUILD)
707 // TODO(port): fix once "enough" works
708 #define NOTREACHED() LOG(ERROR) << "NOTREACHED()"
709 #else
706 #define NOTREACHED() DCHECK(false) 710 #define NOTREACHED() DCHECK(false)
711 #endif
707 712
708 // Redefine the standard assert to use our nice log files 713 // Redefine the standard assert to use our nice log files
709 #undef assert 714 #undef assert
710 #define assert(x) DLOG_ASSERT(x) 715 #define assert(x) DLOG_ASSERT(x)
711 716
712 // This class more or less represents a particular log message. You 717 // This class more or less represents a particular log message. You
713 // create an instance of LogMessage and then stream stuff to it. 718 // create an instance of LogMessage and then stream stuff to it.
714 // When you finish streaming to it, ~LogMessage is called and the 719 // When you finish streaming to it, ~LogMessage is called and the
715 // full message gets streamed to the appropriate destination. 720 // full message gets streamed to the appropriate destination.
716 // 721 //
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 namespace base { 943 namespace base {
939 944
940 class StringPiece; 945 class StringPiece;
941 946
942 // Allows StringPiece to be logged. 947 // Allows StringPiece to be logged.
943 BASE_API std::ostream& operator<<(std::ostream& o, const StringPiece& piece); 948 BASE_API std::ostream& operator<<(std::ostream& o, const StringPiece& piece);
944 949
945 } // namespace base 950 } // namespace base
946 951
947 #endif // BASE_LOGGING_H_ 952 #endif // BASE_LOGGING_H_
OLDNEW
« no previous file with comments | « base/debug/stack_trace_android.cc ('k') | base/logging.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698