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

Unified Diff: net/quic/quic_ack_notifier.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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/quic_ack_notifier.h ('k') | net/quic/quic_ack_notifier_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_ack_notifier.cc
diff --git a/net/quic/quic_ack_notifier.cc b/net/quic/quic_ack_notifier.cc
deleted file mode 100644
index 48ee23df1a45bac5c7ce4876489feb930fabfc36..0000000000000000000000000000000000000000
--- a/net/quic/quic_ack_notifier.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2013 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/quic/quic_ack_notifier.h"
-
-#include <set>
-
-#include "base/logging.h"
-#include "base/stl_util.h"
-
-using base::hash_map;
-using std::make_pair;
-
-namespace net {
-
-QuicAckNotifier::DelegateInterface::DelegateInterface() {}
-
-QuicAckNotifier::DelegateInterface::~DelegateInterface() {}
-
-QuicAckNotifier::QuicAckNotifier(DelegateInterface* delegate)
- : delegate_(delegate),
- unacked_packets_(0),
- retransmitted_packet_count_(0),
- retransmitted_byte_count_(0) {
- DCHECK(delegate);
-}
-
-QuicAckNotifier::~QuicAckNotifier() {
-}
-
-void QuicAckNotifier::OnSerializedPacket() {
- ++unacked_packets_;
-}
-
-bool QuicAckNotifier::OnAck(QuicTime::Delta delta_largest_observed) {
- if (unacked_packets_ <= 0) {
- LOG(DFATAL) << "Acked more packets than were tracked."
- << " unacked_packets:" << unacked_packets_;
- return true;
- }
- --unacked_packets_;
- if (!HasUnackedPackets()) {
- // We have seen all the sequence numbers we were waiting for, trigger
- // callback notification.
- delegate_->OnAckNotification(retransmitted_packet_count_,
- retransmitted_byte_count_,
- delta_largest_observed);
- return true;
- }
- return false;
-}
-
-bool QuicAckNotifier::OnPacketAbandoned() {
- if (unacked_packets_ <= 0) {
- LOG(DFATAL) << "Abandoned more packets than were tracked."
- << " unacked_packets:" << unacked_packets_;
- return true;
- }
- --unacked_packets_;
- return unacked_packets_ == 0;
-}
-
-void QuicAckNotifier::OnPacketRetransmitted(int packet_payload_size) {
- ++retransmitted_packet_count_;
- retransmitted_byte_count_ += packet_payload_size;
-}
-
-}; // namespace net
« no previous file with comments | « net/quic/quic_ack_notifier.h ('k') | net/quic/quic_ack_notifier_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698