summaryrefslogtreecommitdiffstats
path: root/base/logging.h
diff options
context:
space:
mode:
authorerikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-22 21:54:49 +0000
committererikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-22 21:54:49 +0000
commitb1ecd2fc7a6c45987c91051ff480dc6115d3a4dc (patch)
tree6b88220639a7390004385a28d8d17125aeb6c2e5 /base/logging.h
parent11ac5c5d92903ad8e0f970442fe3d85151ea6fa8 (diff)
downloadchromium_src-b1ecd2fc7a6c45987c91051ff480dc6115d3a4dc.zip
chromium_src-b1ecd2fc7a6c45987c91051ff480dc6115d3a4dc.tar.gz
chromium_src-b1ecd2fc7a6c45987c91051ff480dc6115d3a4dc.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= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=114242 Review URL: http://codereview.chromium.org/8659047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115616 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);