OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <algorithm> | 5 #include <algorithm> |
6 #include <deque> | 6 #include <deque> |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 continue; | 71 continue; |
72 } | 72 } |
73 iplist_seen_.push_back(iplist_random[index]); | 73 iplist_seen_.push_back(iplist_random[index]); |
74 server.SetResolvedIP(iplist_random[index]); | 74 server.SetResolvedIP(iplist_random[index]); |
75 PermuteForAddress(server, special_port_magic, try_ssltcp_first, | 75 PermuteForAddress(server, special_port_magic, try_ssltcp_first, |
76 &list_temp); | 76 &list_temp); |
77 } | 77 } |
78 } | 78 } |
79 | 79 |
80 // Add this list to the instance list | 80 // Add this list to the instance list |
81 while (list_temp.size() != 0) { | 81 while (!list_temp.empty()) { |
82 list_.push_back(list_temp[0]); | 82 list_.push_back(list_temp[0]); |
83 list_temp.pop_front(); | 83 list_temp.pop_front(); |
84 } | 84 } |
85 } | 85 } |
86 | 86 |
87 | 87 |
88 void ConnectionSettingsList::PermuteForAddress( | 88 void ConnectionSettingsList::PermuteForAddress( |
89 const talk_base::SocketAddress& server, | 89 const talk_base::SocketAddress& server, |
90 bool special_port_magic, | 90 bool special_port_magic, |
91 bool try_ssltcp_first, | 91 bool try_ssltcp_first, |
(...skipping 10 matching lines...) Expand all Loading... |
102 settings.set_protocol(cricket::PROTO_SSLTCP); | 102 settings.set_protocol(cricket::PROTO_SSLTCP); |
103 settings.mutable_server()->SetPort(443); | 103 settings.mutable_server()->SetPort(443); |
104 if (try_ssltcp_first) { | 104 if (try_ssltcp_first) { |
105 list_temp->push_front(settings); | 105 list_temp->push_front(settings); |
106 } else { | 106 } else { |
107 list_temp->push_back(settings); | 107 list_temp->push_back(settings); |
108 } | 108 } |
109 } | 109 } |
110 } | 110 } |
111 } // namespace notifier | 111 } // namespace notifier |
OLD | NEW |