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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 #if defined(OS_LINUX) | 525 #if defined(OS_LINUX) |
526 host_->SetMaximumSessionDuration(base::TimeDelta::FromHours(20)); | 526 host_->SetMaximumSessionDuration(base::TimeDelta::FromHours(20)); |
527 #endif | 527 #endif |
528 | 528 |
529 heartbeat_sender_.reset(new HeartbeatSender( | 529 heartbeat_sender_.reset(new HeartbeatSender( |
530 this, host_id_, signal_strategy_.get(), &key_pair_)); | 530 this, host_id_, signal_strategy_.get(), &key_pair_)); |
531 | 531 |
532 log_to_server_.reset( | 532 log_to_server_.reset( |
533 new LogToServer(host_, ServerLogEntry::ME2ME, signal_strategy_.get())); | 533 new LogToServer(host_, ServerLogEntry::ME2ME, signal_strategy_.get())); |
534 host_event_logger_ = HostEventLogger::Create(host_, kApplicationName); | 534 host_event_logger_ = HostEventLogger::Create(host_, kApplicationName); |
535 | 535 host_event_logger_->OnStart(xmpp_login_); |
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(); |
545 | 545 |
(...skipping 201 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 |