OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/quic/chromium/quic_chromium_client_session.h" | 5 #include "net/quic/chromium/quic_chromium_client_session.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1462 if (result) { | 1462 if (result) { |
1463 // The push promise is accepted, notify the push_delegate that a push | 1463 // The push promise is accepted, notify the push_delegate that a push |
1464 // promise has been received. | 1464 // promise has been received. |
1465 GURL pushed_url = GetUrlFromHeaderBlock(headers); | 1465 GURL pushed_url = GetUrlFromHeaderBlock(headers); |
1466 if (push_delegate_) { | 1466 if (push_delegate_) { |
1467 push_delegate_->OnPush(base::MakeUnique<QuicServerPushHelper>( | 1467 push_delegate_->OnPush(base::MakeUnique<QuicServerPushHelper>( |
1468 weak_factory_.GetWeakPtr(), pushed_url), | 1468 weak_factory_.GetWeakPtr(), pushed_url), |
1469 net_log_); | 1469 net_log_); |
1470 } | 1470 } |
1471 } | 1471 } |
| 1472 |
| 1473 GURL pushed = GetUrlFromHeaderBlock(headers); |
1472 net_log_.AddEvent(NetLogEventType::QUIC_SESSION_PUSH_PROMISE_RECEIVED, | 1474 net_log_.AddEvent(NetLogEventType::QUIC_SESSION_PUSH_PROMISE_RECEIVED, |
1473 base::Bind(&NetLogQuicPushPromiseReceivedCallback, &headers, | 1475 base::Bind(&NetLogQuicPushPromiseReceivedCallback, &headers, |
1474 id, promised_id)); | 1476 id, promised_id)); |
| 1477 stream_factory_->num_push_promise_received_++; |
1475 return result; | 1478 return result; |
1476 } | 1479 } |
1477 | 1480 |
1478 void QuicChromiumClientSession::DeletePromised( | 1481 void QuicChromiumClientSession::DeletePromised( |
1479 QuicClientPromisedInfo* promised) { | 1482 QuicClientPromisedInfo* promised) { |
1480 if (IsOpenStream(promised->id())) | 1483 if (IsOpenStream(promised->id())) |
1481 streams_pushed_and_claimed_count_++; | 1484 streams_pushed_and_claimed_count_++; |
1482 QuicClientSessionBase::DeletePromised(promised); | 1485 QuicClientSessionBase::DeletePromised(promised); |
1483 } | 1486 } |
1484 | 1487 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1520 } | 1523 } |
1521 | 1524 |
1522 size_t QuicChromiumClientSession::EstimateMemoryUsage() const { | 1525 size_t QuicChromiumClientSession::EstimateMemoryUsage() const { |
1523 // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's | 1526 // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's |
1524 // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and | 1527 // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and |
1525 // unacked packet map. | 1528 // unacked packet map. |
1526 return base::trace_event::EstimateMemoryUsage(packet_readers_); | 1529 return base::trace_event::EstimateMemoryUsage(packet_readers_); |
1527 } | 1530 } |
1528 | 1531 |
1529 } // namespace net | 1532 } // namespace net |
OLD | NEW |