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

Side by Side Diff: base/logging.h

Issue 8659047: De-duplicate common code from StringPiece, StringPiece16, and their tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix two bugs introduced during refactoring. Created 9 years 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/i18n/case_conversion.h ('k') | base/string_piece.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 <cassert> 9 #include <cassert>
10 #include <string> 10 #include <string>
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 #define NOTIMPLEMENTED() LOG(ERROR) << NOTIMPLEMENTED_MSG 976 #define NOTIMPLEMENTED() LOG(ERROR) << NOTIMPLEMENTED_MSG
977 #elif NOTIMPLEMENTED_POLICY == 5 977 #elif NOTIMPLEMENTED_POLICY == 5
978 #define NOTIMPLEMENTED() do {\ 978 #define NOTIMPLEMENTED() do {\
979 static int count = 0;\ 979 static int count = 0;\
980 LOG_IF(ERROR, 0 == count++) << NOTIMPLEMENTED_MSG;\ 980 LOG_IF(ERROR, 0 == count++) << NOTIMPLEMENTED_MSG;\
981 } while(0) 981 } while(0)
982 #endif 982 #endif
983 983
984 namespace base { 984 namespace base {
985 985
986 class StringPiece; 986 template <typename STRING_TYPE> class BasicStringPiece;
987 typedef BasicStringPiece<std::string> StringPiece;
987 988
988 // Allows StringPiece to be logged. 989 // Allows StringPiece to be logged.
989 BASE_EXPORT std::ostream& operator<<(std::ostream& o, const StringPiece& piece); 990 BASE_EXPORT std::ostream& operator<<(std::ostream& o, const StringPiece& piece);
990 991
991 } // namespace base 992 } // namespace base
992 993
993 #endif // BASE_LOGGING_H_ 994 #endif // BASE_LOGGING_H_
OLDNEW
« no previous file with comments | « base/i18n/case_conversion.h ('k') | base/string_piece.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698