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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 host_event_logger_ = HostEventLogger::Create(host_, kApplicationName); | 534 host_event_logger_ = HostEventLogger::Create(host_, kApplicationName); |
535 | 535 |
536 #if defined(OS_MACOSX) || defined(OS_WIN) | 536 #if defined(OS_MACOSX) || defined(OS_WIN) |
537 if (host_user_interface_.get()) { | 537 if (host_user_interface_.get()) { |
538 host_user_interface_->Start( | 538 host_user_interface_->Start( |
539 host_, base::Bind(&HostProcess::OnDisconnectRequested, | 539 host_, base::Bind(&HostProcess::OnDisconnectRequested, |
540 base::Unretained(this))); | 540 base::Unretained(this))); |
541 } | 541 } |
542 #endif | 542 #endif |
543 | 543 |
544 host_->Start(); | 544 host_->Start(xmpp_login_); |
545 | 545 |
546 CreateAuthenticatorFactory(); | 546 CreateAuthenticatorFactory(); |
547 } | 547 } |
548 | 548 |
549 void OnAuthFailed() { | 549 void OnAuthFailed() { |
550 Shutdown(kInvalidOauthCredentialsExitCode); | 550 Shutdown(kInvalidOauthCredentialsExitCode); |
551 } | 551 } |
552 | 552 |
553 // Invoked when the user uses the Disconnect windows to terminate | 553 // Invoked when the user uses the Disconnect windows to terminate |
554 // the sessions. | 554 // the sessions. |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 user32.GetFunctionPointer("SetProcessDPIAware")); | 747 user32.GetFunctionPointer("SetProcessDPIAware")); |
748 set_process_dpi_aware(); | 748 set_process_dpi_aware(); |
749 } | 749 } |
750 | 750 |
751 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting | 751 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting |
752 // the command line from GetCommandLineW(), so we can safely pass NULL here. | 752 // the command line from GetCommandLineW(), so we can safely pass NULL here. |
753 return main(0, NULL); | 753 return main(0, NULL); |
754 } | 754 } |
755 | 755 |
756 #endif // defined(OS_WIN) | 756 #endif // defined(OS_WIN) |
OLD | NEW |