OLD | NEW |
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 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 #define NOTIMPLEMENTED() NOTREACHED() | 912 #define NOTIMPLEMENTED() NOTREACHED() |
913 #elif NOTIMPLEMENTED_POLICY == 4 | 913 #elif NOTIMPLEMENTED_POLICY == 4 |
914 #define NOTIMPLEMENTED() LOG(ERROR) << NOTIMPLEMENTED_MSG | 914 #define NOTIMPLEMENTED() LOG(ERROR) << NOTIMPLEMENTED_MSG |
915 #elif NOTIMPLEMENTED_POLICY == 5 | 915 #elif NOTIMPLEMENTED_POLICY == 5 |
916 #define NOTIMPLEMENTED() do {\ | 916 #define NOTIMPLEMENTED() do {\ |
917 static int count = 0;\ | 917 static int count = 0;\ |
918 LOG_IF(ERROR, 0 == count++) << NOTIMPLEMENTED_MSG;\ | 918 LOG_IF(ERROR, 0 == count++) << NOTIMPLEMENTED_MSG;\ |
919 } while(0) | 919 } while(0) |
920 #endif | 920 #endif |
921 | 921 |
| 922 namespace base { |
| 923 |
| 924 class StringPiece; |
| 925 |
| 926 // allow StringPiece to be logged (needed for unit testing). |
| 927 extern std::ostream& operator<<(std::ostream& o, const StringPiece& piece); |
| 928 |
| 929 } // namespace base |
| 930 |
922 #endif // BASE_LOGGING_H_ | 931 #endif // BASE_LOGGING_H_ |
OLD | NEW |