summaryrefslogtreecommitdiffstats
path: root/base/logging.h
diff options
context:
space:
mode:
authorerikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-13 19:19:36 +0000
committererikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-13 19:19:36 +0000
commit20543ba53ab8737affb06a21149c15f772246aed (patch)
tree2e0307ffdc1d94bbb073078e358b2c0b3d44c3a9 /base/logging.h
parentea097c60d198d83db886af424ae5b4e00785ee9e (diff)
downloadchromium_src-20543ba53ab8737affb06a21149c15f772246aed.zip
chromium_src-20543ba53ab8737affb06a21149c15f772246aed.tar.gz
chromium_src-20543ba53ab8737affb06a21149c15f772246aed.tar.bz2
Extract common code from StringPiece and StringPiece16 into a templated base class. Convert copy-and-pasted unit tests into TYPED_TESTs.
The motivation is that I wish to add constructors for string::iterator ranges and I don't want to do it twice. The motivation for adding the string::iterator range constructors is to reduce the number of overloads in string_number_conversions.h . BUG=87634 TEST= Review URL: http://codereview.chromium.org/8659047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114242 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/logging.h')
-rw-r--r--base/logging.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/base/logging.h b/base/logging.h
index 94a82ad..9c660fa 100644
--- a/base/logging.h
+++ b/base/logging.h
@@ -983,7 +983,8 @@ inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) {
namespace base {
-class StringPiece;
+template <typename STRING_TYPE> class BasicStringPiece;
+typedef BasicStringPiece<std::string> StringPiece;
// Allows StringPiece to be logged.
BASE_EXPORT std::ostream& operator<<(std::ostream& o, const StringPiece& piece);