OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/tools/flip_server/http_interface.h" | 5 #include "net/tools/flip_server/http_interface.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 memory_cache_.get(), | 79 memory_cache_.get(), |
80 acceptor_.get(), | 80 acceptor_.get(), |
81 "log_prefix")); | 81 "log_prefix")); |
82 | 82 |
83 interface_.reset(new HttpSM(connection_.get(), | 83 interface_.reset(new HttpSM(connection_.get(), |
84 mock_another_interface_.get(), | 84 mock_another_interface_.get(), |
85 memory_cache_.get(), | 85 memory_cache_.get(), |
86 acceptor_.get())); | 86 acceptor_.get())); |
87 } | 87 } |
88 | 88 |
89 virtual void TearDown() OVERRIDE { | 89 virtual void TearDown() override { |
90 if (acceptor_->listen_fd_ >= 0) { | 90 if (acceptor_->listen_fd_ >= 0) { |
91 epoll_server_->UnregisterFD(acceptor_->listen_fd_); | 91 epoll_server_->UnregisterFD(acceptor_->listen_fd_); |
92 close(acceptor_->listen_fd_); | 92 close(acceptor_->listen_fd_); |
93 acceptor_->listen_fd_ = -1; | 93 acceptor_->listen_fd_ = -1; |
94 } | 94 } |
95 STLDeleteElements(connection_->output_list()); | 95 STLDeleteElements(connection_->output_list()); |
96 } | 96 } |
97 | 97 |
98 bool HasStream(uint32 stream_id) { | 98 bool HasStream(uint32 stream_id) { |
99 return interface_->output_ordering().ExistsInPriorityMaps(stream_id); | 99 return interface_->output_ordering().ExistsInPriorityMaps(stream_id); |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 } | 482 } |
483 interface_->SendEOF(32); | 483 interface_->SendEOF(32); |
484 ASSERT_EQ(1u, connection_->output_list()->size()); | 484 ASSERT_EQ(1u, connection_->output_list()->size()); |
485 DataFrame* df = connection_->output_list()->front(); | 485 DataFrame* df = connection_->output_list()->front(); |
486 ASSERT_EQ("0\r\n\r\n", StringPiece(df->data, df->size)); | 486 ASSERT_EQ("0\r\n\r\n", StringPiece(df->data, df->size)); |
487 } | 487 } |
488 | 488 |
489 } // namespace | 489 } // namespace |
490 | 490 |
491 } // namespace net | 491 } // namespace net |
OLD | NEW |