Chromium Code Reviews| Index: net/base/io_buffer.h |
| diff --git a/net/base/io_buffer.h b/net/base/io_buffer.h |
| index 0ce52e8d79c02473adabd6af98e2e9272d9b2fdb..53b325358a40230e86d7095a2000abeeb1de67d2 100644 |
| --- a/net/base/io_buffer.h |
| +++ b/net/base/io_buffer.h |
| @@ -115,6 +115,11 @@ class NET_EXPORT StringIOBuffer : public IOBuffer { |
| public: |
| explicit StringIOBuffer(const std::string& s); |
| + // The string passed to this constructor is std::string::swap'd with the |
|
michaeln
2014/08/21 01:46:15
Given the scoped_ptr<> input, the xfer of ownershi
jkarlin
2014/08/21 18:31:21
Done.
|
| + // internal string. This is a low cost way to prevent a copy for strings that |
| + // don't provide copy-on-write semantics. |
| + explicit StringIOBuffer(scoped_ptr<std::string> s); |
| + |
| int size() const { return static_cast<int>(string_data_.size()); } |
| private: |