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

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

Issue 2675343002: Server push cancellation: add NetLogs to track cache lookup transaction (Closed)
Patch Set: fix typo 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
« no previous file with comments | « net/spdy/spdy_test_utils.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_test_utils.h" 5 #include "net/spdy/spdy_test_utils.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 size_t header_bytes_parsed, 161 size_t header_bytes_parsed,
162 size_t /* compressed_header_bytes_parsed */) { 162 size_t /* compressed_header_bytes_parsed */) {
163 header_bytes_parsed_ = header_bytes_parsed; 163 header_bytes_parsed_ = header_bytes_parsed;
164 } 164 }
165 165
166 TestServerPushDelegate::TestServerPushDelegate() {} 166 TestServerPushDelegate::TestServerPushDelegate() {}
167 167
168 TestServerPushDelegate::~TestServerPushDelegate() {} 168 TestServerPushDelegate::~TestServerPushDelegate() {}
169 169
170 void TestServerPushDelegate::OnPush( 170 void TestServerPushDelegate::OnPush(
171 std::unique_ptr<ServerPushHelper> push_helper) { 171 std::unique_ptr<ServerPushHelper> push_helper,
172 const NetLogWithSource& session_net_log) {
172 push_helpers[push_helper->GetURL()] = std::move(push_helper); 173 push_helpers[push_helper->GetURL()] = std::move(push_helper);
173 } 174 }
174 175
175 bool TestServerPushDelegate::CancelPush(GURL url) { 176 bool TestServerPushDelegate::CancelPush(GURL url) {
176 auto itr = push_helpers.find(url); 177 auto itr = push_helpers.find(url);
177 DCHECK(itr != push_helpers.end()); 178 DCHECK(itr != push_helpers.end());
178 itr->second->Cancel(); 179 itr->second->Cancel();
179 push_helpers.erase(itr); 180 push_helpers.erase(itr);
180 return true; 181 return true;
181 } 182 }
182 183
183 } // namespace test 184 } // namespace test
184 } // namespace net 185 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698