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

Unified Diff: net/quic/core/quic_packets.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_packet_generator_test.cc ('k') | net/quic/core/quic_packets.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_packets.h
diff --git a/net/quic/core/quic_packets.h b/net/quic/core/quic_packets.h
index 80398e04e0e5ef493be5d320d66aad26ebb852da..05bd01ce3bb513a8374b6e976118c2f0f5229048 100644
--- a/net/quic/core/quic_packets.h
+++ b/net/quic/core/quic_packets.h
@@ -15,7 +15,6 @@
#include <vector>
#include "base/macros.h"
-#include "base/strings/string_piece.h"
#include "net/base/iovec.h"
#include "net/quic/core/frames/quic_frame.h"
#include "net/quic/core/quic_ack_listener_interface.h"
@@ -27,6 +26,7 @@
#include "net/quic/core/quic_versions.h"
#include "net/quic/platform/api/quic_export.h"
#include "net/quic/platform/api/quic_socket_address.h"
+#include "net/quic/platform/api/quic_string_piece.h"
namespace net {
@@ -108,8 +108,8 @@ class QUIC_EXPORT_PRIVATE QuicData {
QuicData(const char* buffer, size_t length, bool owns_buffer);
virtual ~QuicData();
- base::StringPiece AsStringPiece() const {
- return base::StringPiece(data(), length());
+ QuicStringPiece AsStringPiece() const {
+ return QuicStringPiece(data(), length());
}
const char* data() const { return buffer_; }
@@ -136,8 +136,8 @@ class QUIC_EXPORT_PRIVATE QuicPacket : public QuicData {
bool includes_diversification_nonce,
QuicPacketNumberLength packet_number_length);
- base::StringPiece AssociatedData(QuicVersion version) const;
- base::StringPiece Plaintext(QuicVersion version) const;
+ QuicStringPiece AssociatedData(QuicVersion version) const;
+ QuicStringPiece Plaintext(QuicVersion version) const;
char* mutable_data() { return buffer_; }
« no previous file with comments | « net/quic/core/quic_packet_generator_test.cc ('k') | net/quic/core/quic_packets.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698