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

Unified Diff: net/quic/core/quic_connection.cc

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_connection.h ('k') | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_connection.cc
diff --git a/net/quic/core/quic_connection.cc b/net/quic/core/quic_connection.cc
index 60e6d7e8fd39def121f5eaa53cb1e8d6dd3849ae..04b0d20ff2f54283097311de22af923a67d88fec 100644
--- a/net/quic/core/quic_connection.cc
+++ b/net/quic/core/quic_connection.cc
@@ -35,7 +35,6 @@
#include "net/quic/platform/api/quic_str_cat.h"
#include "net/quic/platform/api/quic_text_utils.h"
-using base::StringPiece;
using std::string;
namespace net {
@@ -1521,8 +1520,8 @@ bool QuicConnection::WritePacket(SerializedPacket* packet) {
<< QuicUtils::EncryptionLevelToString(packet->encryption_level)
<< ", encrypted length:" << encrypted_length;
QUIC_DVLOG(2) << ENDPOINT << "packet(" << packet_number << "): " << std::endl
- << QuicTextUtils::HexDump(
- StringPiece(packet->encrypted_buffer, encrypted_length));
+ << QuicTextUtils::HexDump(QuicStringPiece(
+ packet->encrypted_buffer, encrypted_length));
// Measure the RTT from before the write begins to avoid underestimating the
// min_rtt_, especially in cases where the thread blocks or gets swapped out
@@ -2350,11 +2349,11 @@ bool QuicConnection::ack_frame_updated() const {
return received_packet_manager_.ack_frame_updated();
}
-StringPiece QuicConnection::GetCurrentPacket() {
+QuicStringPiece QuicConnection::GetCurrentPacket() {
if (current_packet_data_ == nullptr) {
- return StringPiece();
+ return QuicStringPiece();
}
- return StringPiece(current_packet_data_, last_size_);
+ return QuicStringPiece(current_packet_data_, last_size_);
}
bool QuicConnection::MaybeConsiderAsMemoryCorruption(
« no previous file with comments | « net/quic/core/quic_connection.h ('k') | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698