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

Side by Side Diff: net/spdy/spdy_session.cc

Issue 2675343002: Server push cancellation: add NetLogs to track cache lookup transaction (Closed)
Patch Set: Always log the push lookup results Created 3 years, 10 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 unified diff | Download patch
OLDNEW
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/spdy/spdy_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 2675 matching lines...) Expand 10 before | Expand all | Expand 10 after
2686 2686
2687 ActiveStreamMap::iterator active_it = active_streams_.find(stream_id); 2687 ActiveStreamMap::iterator active_it = active_streams_.find(stream_id);
2688 if (active_it == active_streams_.end()) { 2688 if (active_it == active_streams_.end()) {
2689 NOTREACHED(); 2689 NOTREACHED();
2690 return; 2690 return;
2691 } 2691 }
2692 2692
2693 // Notify the push_delegate that a push promise has been received. 2693 // Notify the push_delegate that a push promise has been received.
2694 if (push_delegate_) { 2694 if (push_delegate_) {
2695 push_delegate_->OnPush(base::MakeUnique<SpdyServerPushHelper>( 2695 push_delegate_->OnPush(base::MakeUnique<SpdyServerPushHelper>(
2696 weak_factory_.GetWeakPtr(), gurl)); 2696 weak_factory_.GetWeakPtr(), gurl),
2697 net_log_);
2697 } 2698 }
2698 2699
2699 active_it->second->OnPushPromiseHeadersReceived(std::move(headers)); 2700 active_it->second->OnPushPromiseHeadersReceived(std::move(headers));
2700 DCHECK(active_it->second->IsReservedRemote()); 2701 DCHECK(active_it->second->IsReservedRemote());
2701 num_pushed_streams_++; 2702 num_pushed_streams_++;
2702 return; 2703 return;
2703 } 2704 }
2704 2705
2705 void SpdySession::OnPushPromise(SpdyStreamId stream_id, 2706 void SpdySession::OnPushPromise(SpdyStreamId stream_id,
2706 SpdyStreamId promised_stream_id, 2707 SpdyStreamId promised_stream_id,
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
3119 if (!queue->empty()) { 3120 if (!queue->empty()) {
3120 SpdyStreamId stream_id = queue->front(); 3121 SpdyStreamId stream_id = queue->front();
3121 queue->pop_front(); 3122 queue->pop_front();
3122 return stream_id; 3123 return stream_id;
3123 } 3124 }
3124 } 3125 }
3125 return 0; 3126 return 0;
3126 } 3127 }
3127 3128
3128 } // namespace net 3129 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698