| 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 // 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |