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 "remoting/host/remoting_me2me_host.h" | 7 #include "remoting/host/remoting_me2me_host.h" |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 | 516 |
517 std::string local_certificate = key_pair_.GenerateCertificate(); | 517 std::string local_certificate = key_pair_.GenerateCertificate(); |
518 if (local_certificate.empty()) { | 518 if (local_certificate.empty()) { |
519 LOG(ERROR) << "Failed to generate host certificate."; | 519 LOG(ERROR) << "Failed to generate host certificate."; |
520 ShutdownHost(kInitializationFailed); | 520 ShutdownHost(kInitializationFailed); |
521 return; | 521 return; |
522 } | 522 } |
523 | 523 |
524 scoped_ptr<protocol::AuthenticatorFactory> factory( | 524 scoped_ptr<protocol::AuthenticatorFactory> factory( |
525 new protocol::Me2MeHostAuthenticatorFactory( | 525 new protocol::Me2MeHostAuthenticatorFactory( |
526 local_certificate, key_pair_.Copy(), host_secret_hash_)); | 526 local_certificate, key_pair_.Copy(), host_secret_hash_, |
| 527 "", "", NULL)); |
527 #if defined(OS_POSIX) | 528 #if defined(OS_POSIX) |
528 // On Linux and Mac, perform a PAM authorization step after authentication. | 529 // On Linux and Mac, perform a PAM authorization step after authentication. |
529 factory.reset(new PamAuthorizationFactory(factory.Pass())); | 530 factory.reset(new PamAuthorizationFactory(factory.Pass())); |
530 #endif | 531 #endif |
531 host_->SetAuthenticatorFactory(factory.Pass()); | 532 host_->SetAuthenticatorFactory(factory.Pass()); |
532 } | 533 } |
533 | 534 |
534 // IPC::Listener implementation. | 535 // IPC::Listener implementation. |
535 bool HostProcess::OnMessageReceived(const IPC::Message& message) { | 536 bool HostProcess::OnMessageReceived(const IPC::Message& message) { |
536 DCHECK(context_->ui_task_runner()->BelongsToCurrentThread()); | 537 DCHECK(context_->ui_task_runner()->BelongsToCurrentThread()); |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 return exit_code; | 1158 return exit_code; |
1158 } | 1159 } |
1159 | 1160 |
1160 } // namespace remoting | 1161 } // namespace remoting |
1161 | 1162 |
1162 #if !defined(OS_WIN) | 1163 #if !defined(OS_WIN) |
1163 int main(int argc, char** argv) { | 1164 int main(int argc, char** argv) { |
1164 return remoting::HostProcessMain(argc, argv); | 1165 return remoting::HostProcessMain(argc, argv); |
1165 } | 1166 } |
1166 #endif // !defined(OS_WIN) | 1167 #endif // !defined(OS_WIN) |
OLD | NEW |