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

Unified Diff: net/spdy/spdy_pinnable_buffer_piece.cc

Issue 2832973003: Split net/spdy into core and chromium subdirectories. (Closed)
Patch Set: Fix some more build rules. Created 3 years, 8 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
« no previous file with comments | « net/spdy/spdy_pinnable_buffer_piece.h ('k') | net/spdy/spdy_pinnable_buffer_piece_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_pinnable_buffer_piece.cc
diff --git a/net/spdy/spdy_pinnable_buffer_piece.cc b/net/spdy/spdy_pinnable_buffer_piece.cc
deleted file mode 100644
index 01f8d1db1436b358686fb28c6ce1537b74d1ab9e..0000000000000000000000000000000000000000
--- a/net/spdy/spdy_pinnable_buffer_piece.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/spdy/spdy_pinnable_buffer_piece.h"
-
-namespace net {
-
-SpdyPinnableBufferPiece::SpdyPinnableBufferPiece()
- : buffer_(0), length_(0) {}
-
-SpdyPinnableBufferPiece::~SpdyPinnableBufferPiece() {}
-
-void SpdyPinnableBufferPiece::Pin() {
- if (!storage_ && buffer_ != NULL && length_ != 0) {
- storage_.reset(new char[length_]);
- std::copy(buffer_, buffer_ + length_, storage_.get());
- buffer_ = storage_.get();
- }
-}
-
-void SpdyPinnableBufferPiece::Swap(SpdyPinnableBufferPiece* other) {
- size_t length = length_;
- length_ = other->length_;
- other->length_ = length;
-
- const char* buffer = buffer_;
- buffer_ = other->buffer_;
- other->buffer_ = buffer;
-
- storage_.swap(other->storage_);
-}
-
-} // namespace net
« no previous file with comments | « net/spdy/spdy_pinnable_buffer_piece.h ('k') | net/spdy/spdy_pinnable_buffer_piece_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698