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

Side by Side Diff: remoting/host/remoting_me2me_host.cc

Issue 1015853002: Use port 5222 for XMPP connection from Me2Me host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months 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
« no previous file with comments | « remoting/base/service_urls.cc ('k') | remoting/signaling/xmpp_signal_strategy.cc » ('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) 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 // This file implements a standalone host process for Me2Me. 5 // This file implements a standalone host process for Me2Me.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 return false; 487 return false;
488 } 488 }
489 #endif // !defined(REMOTING_MULTI_PROCESS) 489 #endif // !defined(REMOTING_MULTI_PROCESS)
490 490
491 // Ignore certificate requests - the host currently has no client certificate 491 // Ignore certificate requests - the host currently has no client certificate
492 // support, so ignoring certificate requests allows connecting to servers that 492 // support, so ignoring certificate requests allows connecting to servers that
493 // request, but don't require, a certificate (optional client authentication). 493 // request, but don't require, a certificate (optional client authentication).
494 net::URLFetcher::SetIgnoreCertificateRequests(true); 494 net::URLFetcher::SetIgnoreCertificateRequests(true);
495 495
496 ServiceUrls* service_urls = ServiceUrls::GetInstance(); 496 ServiceUrls* service_urls = ServiceUrls::GetInstance();
497 bool xmpp_server_valid = net::ParseHostAndPort( 497
498 service_urls->xmpp_server_address(), 498 const std::string& xmpp_server =
499 &xmpp_server_config_.host, &xmpp_server_config_.port); 499 service_urls->xmpp_server_address_for_me2me_host();
500 if (!xmpp_server_valid) { 500 if (!net::ParseHostAndPort(xmpp_server, &xmpp_server_config_.host,
501 LOG(ERROR) << "Invalid XMPP server: " << 501 &xmpp_server_config_.port)) {
502 service_urls->xmpp_server_address(); 502 LOG(ERROR) << "Invalid XMPP server: " << xmpp_server;
503 return false; 503 return false;
504 } 504 }
505 xmpp_server_config_.use_tls = service_urls->xmpp_server_use_tls(); 505 xmpp_server_config_.use_tls = service_urls->xmpp_server_use_tls();
506 directory_bot_jid_ = service_urls->directory_bot_jid(); 506 directory_bot_jid_ = service_urls->directory_bot_jid();
507 507
508 signal_parent_ = cmd_line->HasSwitch(kSignalParentSwitchName); 508 signal_parent_ = cmd_line->HasSwitch(kSignalParentSwitchName);
509 509
510 enable_window_capture_ = cmd_line->HasSwitch(kWindowIdSwitchName); 510 enable_window_capture_ = cmd_line->HasSwitch(kWindowIdSwitchName);
511 if (enable_window_capture_) { 511 if (enable_window_capture_) {
512 512
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); 1560 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds));
1561 new HostProcess(context.Pass(), &exit_code, &shutdown_watchdog); 1561 new HostProcess(context.Pass(), &exit_code, &shutdown_watchdog);
1562 1562
1563 // Run the main (also UI) message loop until the host no longer needs it. 1563 // Run the main (also UI) message loop until the host no longer needs it.
1564 message_loop.Run(); 1564 message_loop.Run();
1565 1565
1566 return exit_code; 1566 return exit_code;
1567 } 1567 }
1568 1568
1569 } // namespace remoting 1569 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/base/service_urls.cc ('k') | remoting/signaling/xmpp_signal_strategy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698