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

Unified Diff: net/spdy/spdy_pinnable_buffer_piece.h

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_no_op_visitor.cc ('k') | net/spdy/spdy_pinnable_buffer_piece.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.h
diff --git a/net/spdy/spdy_pinnable_buffer_piece.h b/net/spdy/spdy_pinnable_buffer_piece.h
deleted file mode 100644
index c0dc3f2e3b4ccf49119fc8e561b0811c43d1ba61..0000000000000000000000000000000000000000
--- a/net/spdy/spdy_pinnable_buffer_piece.h
+++ /dev/null
@@ -1,59 +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.
-
-#ifndef NET_SPDY_SPDY_PINNABLE_BUFFER_PIECE_H_
-#define NET_SPDY_SPDY_PINNABLE_BUFFER_PIECE_H_
-
-#include <stddef.h>
-
-#include <memory>
-
-#include "net/base/net_export.h"
-#include "net/spdy/platform/api/spdy_string_piece.h"
-
-namespace net {
-
-class SpdyPrefixedBufferReader;
-
-// Helper class of SpdyPrefixedBufferReader.
-// Represents a piece of consumed buffer which may (or may not) own its
-// underlying storage. Users may "pin" the buffer at a later time to ensure
-// a SpdyPinnableBufferPiece owns and retains storage of the buffer.
-struct NET_EXPORT_PRIVATE SpdyPinnableBufferPiece {
- public:
- SpdyPinnableBufferPiece();
- ~SpdyPinnableBufferPiece();
-
- const char * buffer() const {
- return buffer_;
- }
-
- size_t length() const {
- return length_;
- }
-
- explicit operator SpdyStringPiece() const {
- return SpdyStringPiece(buffer_, length_);
- }
-
- // Allocates and copies the buffer to internal storage.
- void Pin();
-
- bool IsPinned() const { return storage_ != nullptr; }
-
- // Swaps buffers, including internal storage, with |other|.
- void Swap(SpdyPinnableBufferPiece* other);
-
- private:
- friend class SpdyPrefixedBufferReader;
-
- const char * buffer_;
- size_t length_;
- // Null iff |buffer_| isn't pinned.
- std::unique_ptr<char[]> storage_;
-};
-
-} // namespace net
-
-#endif // NET_SPDY_SPDY_PINNABLE_BUFFER_PIECE_H_
« no previous file with comments | « net/spdy/spdy_no_op_visitor.cc ('k') | net/spdy/spdy_pinnable_buffer_piece.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698