| 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/http/http_pipelined_connection_impl.h" | 5 #include "net/http/http_pipelined_connection_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 if (reads_count || writes_count) { | 85 if (reads_count || writes_count) { |
| 86 data_->StopAfter(reads_count + writes_count); | 86 data_->StopAfter(reads_count + writes_count); |
| 87 } | 87 } |
| 88 factory_.AddSocketDataProvider(data_.get()); | 88 factory_.AddSocketDataProvider(data_.get()); |
| 89 scoped_refptr<DummySocketParams> params; | 89 scoped_refptr<DummySocketParams> params; |
| 90 ClientSocketHandle* connection = new ClientSocketHandle; | 90 ClientSocketHandle* connection = new ClientSocketHandle; |
| 91 connection->Init("a", params, MEDIUM, CompletionCallback(), &pool_, | 91 connection->Init("a", params, MEDIUM, CompletionCallback(), &pool_, |
| 92 BoundNetLog()); | 92 BoundNetLog()); |
| 93 pipeline_.reset(new HttpPipelinedConnectionImpl( | 93 pipeline_.reset(new HttpPipelinedConnectionImpl( |
| 94 connection, &delegate_, origin_, ssl_config_, proxy_info_, | 94 connection, &delegate_, origin_, ssl_config_, proxy_info_, |
| 95 BoundNetLog(), false, SSLClientSocket::kProtoUnknown)); | 95 BoundNetLog(), false, kProtoUnknown)); |
| 96 } | 96 } |
| 97 | 97 |
| 98 HttpRequestInfo* GetRequestInfo(const std::string& filename) { | 98 HttpRequestInfo* GetRequestInfo(const std::string& filename) { |
| 99 HttpRequestInfo* request_info = new HttpRequestInfo; | 99 HttpRequestInfo* request_info = new HttpRequestInfo; |
| 100 request_info->url = GURL("http://localhost/" + filename); | 100 request_info->url = GURL("http://localhost/" + filename); |
| 101 request_info->method = "GET"; | 101 request_info->method = "GET"; |
| 102 request_info_vector_.push_back(request_info); | 102 request_info_vector_.push_back(request_info); |
| 103 return request_info; | 103 return request_info; |
| 104 } | 104 } |
| 105 | 105 |
| (...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1532 MessageLoop::current()->RunAllPending(); | 1532 MessageLoop::current()->RunAllPending(); |
| 1533 | 1533 |
| 1534 stream->Close(false); | 1534 stream->Close(false); |
| 1535 EXPECT_CALL(delegate_, OnPipelineHasCapacity(pipeline_.get())).Times(1); | 1535 EXPECT_CALL(delegate_, OnPipelineHasCapacity(pipeline_.get())).Times(1); |
| 1536 stream.reset(NULL); | 1536 stream.reset(NULL); |
| 1537 } | 1537 } |
| 1538 | 1538 |
| 1539 } // anonymous namespace | 1539 } // anonymous namespace |
| 1540 | 1540 |
| 1541 } // namespace net | 1541 } // namespace net |
| OLD | NEW |