| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/quic/chromium/quic_stream_factory_peer.h" | 5 #include "net/quic/chromium/quic_stream_factory_peer.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "net/cert/x509_certificate.h" | 10 #include "net/cert/x509_certificate.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 return factory->HasActiveCertVerifierJob(server_id); | 46 return factory->HasActiveCertVerifierJob(server_id); |
| 47 } | 47 } |
| 48 | 48 |
| 49 QuicChromiumClientSession* QuicStreamFactoryPeer::GetActiveSession( | 49 QuicChromiumClientSession* QuicStreamFactoryPeer::GetActiveSession( |
| 50 QuicStreamFactory* factory, | 50 QuicStreamFactory* factory, |
| 51 const QuicServerId& server_id) { | 51 const QuicServerId& server_id) { |
| 52 DCHECK(factory->HasActiveSession(server_id)); | 52 DCHECK(factory->HasActiveSession(server_id)); |
| 53 return factory->active_sessions_[server_id]; | 53 return factory->active_sessions_[server_id]; |
| 54 } | 54 } |
| 55 | 55 |
| 56 std::unique_ptr<QuicHttpStream> QuicStreamFactoryPeer::CreateFromSession( | |
| 57 QuicStreamFactory* factory, | |
| 58 QuicChromiumClientSession* session) { | |
| 59 return factory->CreateFromSession(session); | |
| 60 } | |
| 61 | |
| 62 bool QuicStreamFactoryPeer::IsLiveSession(QuicStreamFactory* factory, | 56 bool QuicStreamFactoryPeer::IsLiveSession(QuicStreamFactory* factory, |
| 63 QuicChromiumClientSession* session) { | 57 QuicChromiumClientSession* session) { |
| 64 for (QuicStreamFactory::SessionIdMap::iterator it = | 58 for (QuicStreamFactory::SessionIdMap::iterator it = |
| 65 factory->all_sessions_.begin(); | 59 factory->all_sessions_.begin(); |
| 66 it != factory->all_sessions_.end(); ++it) { | 60 it != factory->all_sessions_.end(); ++it) { |
| 67 if (it->first == session) | 61 if (it->first == session) |
| 68 return true; | 62 return true; |
| 69 } | 63 } |
| 70 return false; | 64 return false; |
| 71 } | 65 } |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 } | 171 } |
| 178 | 172 |
| 179 void QuicStreamFactoryPeer::SetAlarmFactory( | 173 void QuicStreamFactoryPeer::SetAlarmFactory( |
| 180 QuicStreamFactory* factory, | 174 QuicStreamFactory* factory, |
| 181 std::unique_ptr<QuicAlarmFactory> alarm_factory) { | 175 std::unique_ptr<QuicAlarmFactory> alarm_factory) { |
| 182 factory->alarm_factory_ = std::move(alarm_factory); | 176 factory->alarm_factory_ = std::move(alarm_factory); |
| 183 } | 177 } |
| 184 | 178 |
| 185 } // namespace test | 179 } // namespace test |
| 186 } // namespace net | 180 } // namespace net |
| OLD | NEW |