| 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/p2p/port_allocator.h" | 5 #include "content/renderer/p2p/port_allocator.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 relay_ip_.Clear(); | 218 relay_ip_.Clear(); |
| 219 relay_udp_port_ = 0; | 219 relay_udp_port_ = 0; |
| 220 relay_tcp_port_ = 0; | 220 relay_tcp_port_ = 0; |
| 221 relay_ssltcp_port_ = 0; | 221 relay_ssltcp_port_ = 0; |
| 222 | 222 |
| 223 for (std::vector<std::pair<std::string, std::string> >::iterator | 223 for (std::vector<std::pair<std::string, std::string> >::iterator |
| 224 it = value_pairs.begin(); | 224 it = value_pairs.begin(); |
| 225 it != value_pairs.end(); ++it) { | 225 it != value_pairs.end(); ++it) { |
| 226 std::string key; | 226 std::string key; |
| 227 std::string value; | 227 std::string value; |
| 228 TrimWhitespaceASCII(it->first, TRIM_ALL, &key); | 228 base::TrimWhitespaceASCII(it->first, base::TRIM_ALL, &key); |
| 229 TrimWhitespaceASCII(it->second, TRIM_ALL, &value); | 229 base::TrimWhitespaceASCII(it->second, base::TRIM_ALL, &value); |
| 230 | 230 |
| 231 if (key == "username") { | 231 if (key == "username") { |
| 232 if (value != username()) { | 232 if (value != username()) { |
| 233 LOG(ERROR) << "When creating relay session received user name " | 233 LOG(ERROR) << "When creating relay session received user name " |
| 234 " that was different from the value specified in the query."; | 234 " that was different from the value specified in the query."; |
| 235 return; | 235 return; |
| 236 } | 236 } |
| 237 } else if (key == "password") { | 237 } else if (key == "password") { |
| 238 if (value != password()) { | 238 if (value != password()) { |
| 239 LOG(ERROR) << "When creating relay session received password " | 239 LOG(ERROR) << "When creating relay session received password " |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 config.relays[i].port), | 287 config.relays[i].port), |
| 288 protocol, | 288 protocol, |
| 289 config.relays[i].secure)); | 289 config.relays[i].secure)); |
| 290 relay_server.credentials = credentials; | 290 relay_server.credentials = credentials; |
| 291 port_config->AddRelay(relay_server); | 291 port_config->AddRelay(relay_server); |
| 292 } | 292 } |
| 293 ConfigReady(port_config); | 293 ConfigReady(port_config); |
| 294 } | 294 } |
| 295 | 295 |
| 296 } // namespace content | 296 } // namespace content |
| OLD | NEW |