diff options
author | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-21 09:37:13 +0000 |
---|---|---|
committer | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-21 09:37:13 +0000 |
commit | 2b1d9f1e40a879897f13c0189757ebd135ade38b (patch) | |
tree | 4ebad79e51561460834cd65181c3940f3cc0d66d /base/base64.cc | |
parent | bd183ec2e20df5d2c18ace26cbb0c1c0ede1d70a (diff) | |
download | chromium_src-2b1d9f1e40a879897f13c0189757ebd135ade38b.zip chromium_src-2b1d9f1e40a879897f13c0189757ebd135ade38b.tar.gz chromium_src-2b1d9f1e40a879897f13c0189757ebd135ade38b.tar.bz2 |
Added RefCountedString, as this is what many RefCountedMemory users seem to want
Made data member of RefCountedBytes private, as per style guide
Changed base64 APIs to accept StringPiece, as it's sometimes better and never worse than string.
BUG=None
TEST=All existing tests pass. Extended ref_counted_memory_unittests
Review URL: http://codereview.chromium.org/7397021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93365 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/base64.cc')
-rw-r--r-- | base/base64.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/base/base64.cc b/base/base64.cc index 56a577d..62bd12d 100644 --- a/base/base64.cc +++ b/base/base64.cc @@ -8,7 +8,7 @@ namespace base { -bool Base64Encode(const std::string& input, std::string* output) { +bool Base64Encode(const StringPiece& input, std::string* output) { std::string temp; temp.resize(modp_b64_encode_len(input.size())); // makes room for null byte @@ -23,7 +23,7 @@ bool Base64Encode(const std::string& input, std::string* output) { return true; } -bool Base64Decode(const std::string& input, std::string* output) { +bool Base64Decode(const StringPiece& input, std::string* output) { std::string temp; temp.resize(modp_b64_decode_len(input.size())); |