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

Unified Diff: net/base/io_buffer.cc

Issue 465463002: Initial implementation of ServiceWorkerCache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cache2
Patch Set: Put and Match mostly work with blobs but the first few bytes are screwy 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.cc
diff --git a/net/base/io_buffer.cc b/net/base/io_buffer.cc
index dd1d4517eeab06721b62d3f70faf7c91f3a885d1..5bf299bb8bd973851840580bb1862f288515676e 100644
--- a/net/base/io_buffer.cc
+++ b/net/base/io_buffer.cc
@@ -52,6 +52,17 @@ StringIOBuffer::~StringIOBuffer() {
data_ = NULL;
}
+ZeroCopyStringIOBuffer::ZeroCopyStringIOBuffer() : IOBuffer() {
+}
+
+void ZeroCopyStringIOBuffer::Done() {
+ data_ = const_cast<char*>(string_.data());
+}
+
+ZeroCopyStringIOBuffer::~ZeroCopyStringIOBuffer() {
+ data_ = NULL;
+}
+
DrainableIOBuffer::DrainableIOBuffer(IOBuffer* base, int size)
: IOBuffer(base->data()),
base_(base),
« content/browser/service_worker/service_worker_cache.cc ('K') | « net/base/io_buffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698