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

Unified Diff: net/base/io_buffer.h

Issue 465463002: Initial implementation of ServiceWorkerCache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cache2
Patch Set: Fix order of eval error Created 6 years, 4 months 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 side-by-side diff with in-line comments
Download patch
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:

Powered by Google App Engine
This is Rietveld 408576698