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

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

Issue 2351513002: net: rename BoundNetLog to NetLogWithSource (Closed)
Patch Set: REBASE Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/bidirectional_stream_spdy_impl.h" 5 #include "net/spdy/bidirectional_stream_spdy_impl.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 CHECK(!on_failed_called_); 103 CHECK(!on_failed_called_);
104 CHECK(!not_expect_callback_); 104 CHECK(!not_expect_callback_);
105 CHECK_NE(OK, error); 105 CHECK_NE(OK, error);
106 error_ = error; 106 error_ = error;
107 on_failed_called_ = true; 107 on_failed_called_ = true;
108 if (run_until_completion_) 108 if (run_until_completion_)
109 loop_->Quit(); 109 loop_->Quit();
110 } 110 }
111 111
112 void Start(const BidirectionalStreamRequestInfo* request, 112 void Start(const BidirectionalStreamRequestInfo* request,
113 const BoundNetLog& net_log) { 113 const NetLogWithSource& net_log) {
114 stream_->Start(request, net_log, 114 stream_->Start(request, net_log,
115 /*send_request_headers_automatically=*/false, this, 115 /*send_request_headers_automatically=*/false, this,
116 base::MakeUnique<base::Timer>(false, false)); 116 base::MakeUnique<base::Timer>(false, false));
117 not_expect_callback_ = false; 117 not_expect_callback_ = false;
118 } 118 }
119 119
120 void SendData(IOBuffer* data, int length, bool end_of_stream) { 120 void SendData(IOBuffer* data, int length, bool end_of_stream) {
121 not_expect_callback_ = true; 121 not_expect_callback_ = true;
122 stream_->SendData(data, length, end_of_stream); 122 stream_->SendData(data, length, end_of_stream);
123 not_expect_callback_ = false; 123 not_expect_callback_ = false;
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 EXPECT_EQ(0, delegate->on_data_sent_count()); 307 EXPECT_EQ(0, delegate->on_data_sent_count());
308 EXPECT_EQ(kProtoHTTP2, delegate->GetProtocol()); 308 EXPECT_EQ(kProtoHTTP2, delegate->GetProtocol());
309 // BidirectionalStreamSpdyStreamJob does not count the bytes sent for |rst| 309 // BidirectionalStreamSpdyStreamJob does not count the bytes sent for |rst|
310 // because it is sent after SpdyStream::Delegate::OnClose is called. 310 // because it is sent after SpdyStream::Delegate::OnClose is called.
311 EXPECT_EQ(CountWriteBytes(writes, 1), delegate->GetTotalSentBytes()); 311 EXPECT_EQ(CountWriteBytes(writes, 1), delegate->GetTotalSentBytes());
312 EXPECT_EQ(CountReadBytes(reads, arraysize(reads)), 312 EXPECT_EQ(CountReadBytes(reads, arraysize(reads)),
313 delegate->GetTotalReceivedBytes()); 313 delegate->GetTotalReceivedBytes());
314 } 314 }
315 315
316 } // namespace net 316 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698