| 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 "chrome/browser/sync/test/integration/sync_test.h" | 5 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 } | 468 } |
| 469 if ((xmpp_port <= 0) || (xmpp_port > kuint16max)) { | 469 if ((xmpp_port <= 0) || (xmpp_port > kuint16max)) { |
| 470 LOG(ERROR) << "Invalid xmpp port: " << xmpp_port; | 470 LOG(ERROR) << "Invalid xmpp port: " << xmpp_port; |
| 471 return false; | 471 return false; |
| 472 } | 472 } |
| 473 | 473 |
| 474 net::HostPortPair xmpp_host_port_pair(sync_server_.host_port_pair()); | 474 net::HostPortPair xmpp_host_port_pair(sync_server_.host_port_pair()); |
| 475 xmpp_host_port_pair.set_port(xmpp_port); | 475 xmpp_host_port_pair.set_port(xmpp_port); |
| 476 xmpp_port_.reset(new net::ScopedPortException(xmpp_port)); | 476 xmpp_port_.reset(new net::ScopedPortException(xmpp_port)); |
| 477 | 477 |
| 478 if (!cl->HasSwitch(switches::kSyncNotificationHost)) { | 478 if (!cl->HasSwitch(switches::kSyncNotificationHostPort)) { |
| 479 cl->AppendSwitchASCII(switches::kSyncNotificationHost, | 479 cl->AppendSwitchASCII(switches::kSyncNotificationHostPort, |
| 480 xmpp_host_port_pair.ToString()); | 480 xmpp_host_port_pair.ToString()); |
| 481 // The local XMPP server only supports insecure connections. | 481 // The local XMPP server only supports insecure connections. |
| 482 cl->AppendSwitch(switches::kSyncAllowInsecureXmppConnection); | 482 cl->AppendSwitch(switches::kSyncAllowInsecureXmppConnection); |
| 483 } | 483 } |
| 484 DVLOG(1) << "Started local python XMPP server at " | 484 DVLOG(1) << "Started local python XMPP server at " |
| 485 << xmpp_host_port_pair.ToString(); | 485 << xmpp_host_port_pair.ToString(); |
| 486 | 486 |
| 487 return true; | 487 return true; |
| 488 } | 488 } |
| 489 | 489 |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 | 759 |
| 760 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, | 760 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, |
| 761 const net::ProxyConfig& proxy_config) { | 761 const net::ProxyConfig& proxy_config) { |
| 762 base::WaitableEvent done(false, false); | 762 base::WaitableEvent done(false, false); |
| 763 BrowserThread::PostTask( | 763 BrowserThread::PostTask( |
| 764 BrowserThread::IO, FROM_HERE, | 764 BrowserThread::IO, FROM_HERE, |
| 765 base::Bind(&SetProxyConfigCallback, &done, | 765 base::Bind(&SetProxyConfigCallback, &done, |
| 766 make_scoped_refptr(context_getter), proxy_config)); | 766 make_scoped_refptr(context_getter), proxy_config)); |
| 767 done.Wait(); | 767 done.Wait(); |
| 768 } | 768 } |
| OLD | NEW |