Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1241)

Side by Side Diff: jingle/notifier/communicator/connection_settings.cc

Issue 5239001: [Sync] Make sync integration tests use local xmpp servers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unneeded switch Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « jingle/notifier/communicator/connection_settings.h ('k') | net/test/test_server.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 22 matching lines...) Expand all
33 xcs->set_proxy(talk_base::PROXY_NONE); 33 xcs->set_proxy(talk_base::PROXY_NONE);
34 xcs->set_use_proxy_auth(false); 34 xcs->set_use_proxy_auth(false);
35 } 35 }
36 36
37 ConnectionSettingsList::ConnectionSettingsList() {} 37 ConnectionSettingsList::ConnectionSettingsList() {}
38 38
39 ConnectionSettingsList::~ConnectionSettingsList() {} 39 ConnectionSettingsList::~ConnectionSettingsList() {}
40 40
41 void ConnectionSettingsList::AddPermutations(const std::string& hostname, 41 void ConnectionSettingsList::AddPermutations(const std::string& hostname,
42 const std::vector<uint32>& iplist, 42 const std::vector<uint32>& iplist,
43 int16 port, 43 uint16 port,
44 bool special_port_magic, 44 bool special_port_magic,
45 bool try_ssltcp_first) { 45 bool try_ssltcp_first) {
46 // randomize the list. This ensures the iplist isn't always 46 // randomize the list. This ensures the iplist isn't always
47 // evaluated in the order returned by DNS 47 // evaluated in the order returned by DNS
48 std::vector<uint32> iplist_random = iplist; 48 std::vector<uint32> iplist_random = iplist;
49 RandomGenerator rg; 49 RandomGenerator rg;
50 std::random_shuffle(iplist_random.begin(), iplist_random.end(), rg); 50 std::random_shuffle(iplist_random.begin(), iplist_random.end(), rg);
51 51
52 // Put generated addresses in a new deque, then append on the list_, since 52 // Put generated addresses in a new deque, then append on the list_, since
53 // there are order dependencies and AddPermutations() may be called more 53 // there are order dependencies and AddPermutations() may be called more
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « jingle/notifier/communicator/connection_settings.h ('k') | net/test/test_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698