| 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 "content/renderer/media/media_stream_dependency_factory.h" | 5 #include "content/renderer/media/media_stream_dependency_factory.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 config.stun_server_port = stun_servers[0].server.port(); | 114 config.stun_server_port = stun_servers[0].server.port(); |
| 115 } | 115 } |
| 116 config.legacy_relay = false; | 116 config.legacy_relay = false; |
| 117 for (size_t i = 0; i < turn_configurations.size(); ++i) { | 117 for (size_t i = 0; i < turn_configurations.size(); ++i) { |
| 118 P2PPortAllocator::Config::RelayServerConfig relay_config; | 118 P2PPortAllocator::Config::RelayServerConfig relay_config; |
| 119 relay_config.server_address = turn_configurations[i].server.hostname(); | 119 relay_config.server_address = turn_configurations[i].server.hostname(); |
| 120 relay_config.port = turn_configurations[i].server.port(); | 120 relay_config.port = turn_configurations[i].server.port(); |
| 121 relay_config.username = turn_configurations[i].username; | 121 relay_config.username = turn_configurations[i].username; |
| 122 relay_config.password = turn_configurations[i].password; | 122 relay_config.password = turn_configurations[i].password; |
| 123 relay_config.transport_type = turn_configurations[i].transport_type; | 123 relay_config.transport_type = turn_configurations[i].transport_type; |
| 124 relay_config.secure = turn_configurations[i].secure; |
| 124 config.relays.push_back(relay_config); | 125 config.relays.push_back(relay_config); |
| 125 } | 126 } |
| 126 | 127 |
| 127 // Use first turn server as the stun server. | 128 // Use first turn server as the stun server. |
| 128 if (turn_configurations.size() > 0) { | 129 if (turn_configurations.size() > 0) { |
| 129 config.stun_server = config.relays[0].server_address; | 130 config.stun_server = config.relays[0].server_address; |
| 130 config.stun_server_port = config.relays[0].port; | 131 config.stun_server_port = config.relays[0].port; |
| 131 } | 132 } |
| 132 | 133 |
| 133 return new P2PPortAllocator( | 134 return new P2PPortAllocator( |
| (...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 // processed before returning. We wait for the above task to finish before | 836 // processed before returning. We wait for the above task to finish before |
| 836 // letting the the function continue to avoid any potential race issues. | 837 // letting the the function continue to avoid any potential race issues. |
| 837 chrome_worker_thread_.Stop(); | 838 chrome_worker_thread_.Stop(); |
| 838 } else { | 839 } else { |
| 839 NOTREACHED() << "Worker thread not running."; | 840 NOTREACHED() << "Worker thread not running."; |
| 840 } | 841 } |
| 841 } | 842 } |
| 842 } | 843 } |
| 843 | 844 |
| 844 } // namespace content | 845 } // namespace content |
| OLD | NEW |