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

Unified Diff: net/quic/core/quic_stream_sequencer_buffer.h

Issue 2740453006: Add QuicStringPiece which is actually StringPiece. (Closed)
Patch Set: fix compile error and rebase Created 3 years, 9 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/quic/core/quic_stream_sequencer.cc ('k') | net/quic/core/quic_stream_sequencer_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_stream_sequencer_buffer.h
diff --git a/net/quic/core/quic_stream_sequencer_buffer.h b/net/quic/core/quic_stream_sequencer_buffer.h
index bd57ac93435b5cc26e74666f4507061635660f90..781e6bb73c53fbdab2d6d60c82197c1e3df2d323 100644
--- a/net/quic/core/quic_stream_sequencer_buffer.h
+++ b/net/quic/core/quic_stream_sequencer_buffer.h
@@ -28,11 +28,11 @@
// Expected Use:
// QuicStreamSequencerBuffer buffer(2.5 * 8 * 1024);
// std::string source(1024, 'a');
-// base::StringPiece std::string_piece(source.data(), source.size());
+// QuicStringPiece std::string_piece(source.data(), source.size());
// size_t written = 0;
// buffer.OnStreamData(800, std::string_piece, GetEpollClockNow(), &written);
// source = std::string{800, 'b'};
-// base::StringPiece std::string_piece1(source.data(), 800);
+// QuicStringPiece std::string_piece1(source.data(), 800);
// // Try to write to [1, 801), but should fail due to overlapping,
// // res should be QUIC_INVALID_STREAM_DATA
// auto res = buffer.OnStreamData(1, std::string_piece1, &written));
@@ -67,6 +67,7 @@
#include "base/macros.h"
#include "net/quic/core/quic_packets.h"
#include "net/quic/platform/api/quic_export.h"
+#include "net/quic/platform/api/quic_string_piece.h"
namespace net {
@@ -117,7 +118,7 @@ class QUIC_EXPORT_PRIVATE QuicStreamSequencerBuffer {
// bytes buffered in |bytes_buffered|. Returns an error otherwise.
// |timestamp| is the time the data arrived.
QuicErrorCode OnStreamData(QuicStreamOffset offset,
- base::StringPiece data,
+ QuicStringPiece data,
QuicTime timestamp,
size_t* bytes_buffered,
std::string* error_details);
« no previous file with comments | « net/quic/core/quic_stream_sequencer.cc ('k') | net/quic/core/quic_stream_sequencer_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698