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

Side by Side Diff: base/logging.h

Issue 6877053: Base: More adjustments to BASE_API and project dependencies to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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/files/file_path_watcher.h ('k') | base/message_loop.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) 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 <string> 9 #include <string>
10 #include <cstring> 10 #include <cstring>
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 787
788 // A non-macro interface to the log facility; (useful 788 // A non-macro interface to the log facility; (useful
789 // when the logging level is not a compile-time constant). 789 // when the logging level is not a compile-time constant).
790 inline void LogAtLevel(int const log_level, std::string const &msg) { 790 inline void LogAtLevel(int const log_level, std::string const &msg) {
791 LogMessage(__FILE__, __LINE__, log_level).stream() << msg; 791 LogMessage(__FILE__, __LINE__, log_level).stream() << msg;
792 } 792 }
793 793
794 // This class is used to explicitly ignore values in the conditional 794 // This class is used to explicitly ignore values in the conditional
795 // logging macros. This avoids compiler warnings like "value computed 795 // logging macros. This avoids compiler warnings like "value computed
796 // is not used" and "statement has no effect". 796 // is not used" and "statement has no effect".
797 class BASE_API LogMessageVoidify { 797 class LogMessageVoidify {
798 public: 798 public:
799 LogMessageVoidify() { } 799 LogMessageVoidify() { }
800 // This has to be an operator with a precedence lower than << but 800 // This has to be an operator with a precedence lower than << but
801 // higher than ?: 801 // higher than ?:
802 void operator&(std::ostream&) { } 802 void operator&(std::ostream&) { }
803 }; 803 };
804 804
805 #if defined(OS_WIN) 805 #if defined(OS_WIN)
806 typedef unsigned long SystemErrorCode; 806 typedef unsigned long SystemErrorCode;
807 #elif defined(OS_POSIX) 807 #elif defined(OS_POSIX)
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 namespace base { 937 namespace base {
938 938
939 class StringPiece; 939 class StringPiece;
940 940
941 // Allows StringPiece to be logged. 941 // Allows StringPiece to be logged.
942 BASE_API std::ostream& operator<<(std::ostream& o, const StringPiece& piece); 942 BASE_API std::ostream& operator<<(std::ostream& o, const StringPiece& piece);
943 943
944 } // namespace base 944 } // namespace base
945 945
946 #endif // BASE_LOGGING_H_ 946 #endif // BASE_LOGGING_H_
OLDNEW
« no previous file with comments | « base/files/file_path_watcher.h ('k') | base/message_loop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698