| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 PortAllocatorSession* pooled_session = CreateSessionInternal("", 0, "", ""); | 61 PortAllocatorSession* pooled_session = CreateSessionInternal("", 0, "", ""); |
| 62 pooled_session->StartGettingPorts(); | 62 pooled_session->StartGettingPorts(); |
| 63 pooled_sessions_.push_back( | 63 pooled_sessions_.push_back( |
| 64 std::unique_ptr<PortAllocatorSession>(pooled_session)); | 64 std::unique_ptr<PortAllocatorSession>(pooled_session)); |
| 65 ++allocated_pooled_session_count_; | 65 ++allocated_pooled_session_count_; |
| 66 } | 66 } |
| 67 target_pooled_session_count_ = candidate_pool_size; | 67 target_pooled_session_count_ = candidate_pool_size; |
| 68 } | 68 } |
| 69 | 69 |
| 70 std::unique_ptr<PortAllocatorSession> PortAllocator::CreateSession( | 70 std::unique_ptr<PortAllocatorSession> PortAllocator::CreateSession( |
| 71 const std::string& sid, | |
| 72 const std::string& content_name, | 71 const std::string& content_name, |
| 73 int component, | 72 int component, |
| 74 const std::string& ice_ufrag, | 73 const std::string& ice_ufrag, |
| 75 const std::string& ice_pwd) { | 74 const std::string& ice_pwd) { |
| 76 auto session = std::unique_ptr<PortAllocatorSession>( | 75 auto session = std::unique_ptr<PortAllocatorSession>( |
| 77 CreateSessionInternal(content_name, component, ice_ufrag, ice_pwd)); | 76 CreateSessionInternal(content_name, component, ice_ufrag, ice_pwd)); |
| 78 session->SetCandidateFilter(candidate_filter()); | 77 session->SetCandidateFilter(candidate_filter()); |
| 79 return session; | 78 return session; |
| 80 } | 79 } |
| 81 | 80 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 100 } | 99 } |
| 101 | 100 |
| 102 const PortAllocatorSession* PortAllocator::GetPooledSession() const { | 101 const PortAllocatorSession* PortAllocator::GetPooledSession() const { |
| 103 if (pooled_sessions_.empty()) { | 102 if (pooled_sessions_.empty()) { |
| 104 return nullptr; | 103 return nullptr; |
| 105 } | 104 } |
| 106 return pooled_sessions_.front().get(); | 105 return pooled_sessions_.front().get(); |
| 107 } | 106 } |
| 108 | 107 |
| 109 } // namespace cricket | 108 } // namespace cricket |
| OLD | NEW |