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

Side by Side Diff: net/http/http_response_body_drainer_unittest.cc

Issue 7255002: Revert 90373 - Warmth of a connection (cwnd) is estimated by the amount of data written to the so... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/http/http_proxy_client_socket.cc ('k') | net/http/http_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:mergeinfo
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/http/http_response_body_drainer.h" 5 #include "net/http/http_response_body_drainer.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 111
112 virtual HttpStream* RenewStreamForAuth() OVERRIDE { 112 virtual HttpStream* RenewStreamForAuth() OVERRIDE {
113 return NULL; 113 return NULL;
114 } 114 }
115 115
116 virtual bool IsResponseBodyComplete() const OVERRIDE { return is_complete_; } 116 virtual bool IsResponseBodyComplete() const OVERRIDE { return is_complete_; }
117 117
118 virtual bool IsSpdyHttpStream() const OVERRIDE { return false; } 118 virtual bool IsSpdyHttpStream() const OVERRIDE { return false; }
119 119
120 virtual void LogNumRttVsBytesMetrics() const OVERRIDE {}
121
122 // Methods to tweak/observer mock behavior: 120 // Methods to tweak/observer mock behavior:
123 void StallReadsForever() { stall_reads_forever_ = true; } 121 void StallReadsForever() { stall_reads_forever_ = true; }
124 122
125 void set_num_chunks(int num_chunks) { num_chunks_ = num_chunks; } 123 void set_num_chunks(int num_chunks) { num_chunks_ = num_chunks; }
126 124
127 private: 125 private:
128 void CompleteRead(); 126 void CompleteRead();
129 127
130 bool closed() const { return closed_; } 128 bool closed() const { return closed_; }
131 129
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 too_many_chunks += 1; // Now it's too large. 242 too_many_chunks += 1; // Now it's too large.
245 243
246 mock_stream_->set_num_chunks(too_many_chunks); 244 mock_stream_->set_num_chunks(too_many_chunks);
247 drainer_->Start(session_); 245 drainer_->Start(session_);
248 EXPECT_TRUE(result_waiter_.WaitForResult()); 246 EXPECT_TRUE(result_waiter_.WaitForResult());
249 } 247 }
250 248
251 } // namespace 249 } // namespace
252 250
253 } // namespace net 251 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket.cc ('k') | net/http/http_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698