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 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 if (third_party_auth_config_.is_empty()) { | 622 if (third_party_auth_config_.is_empty()) { |
623 scoped_refptr<PairingRegistry> pairing_registry; | 623 scoped_refptr<PairingRegistry> pairing_registry; |
624 if (allow_pairing_) { | 624 if (allow_pairing_) { |
625 // On Windows |pairing_registry_| is initialized in | 625 // On Windows |pairing_registry_| is initialized in |
626 // InitializePairingRegistry(). | 626 // InitializePairingRegistry(). |
627 #if !defined(OS_WIN) | 627 #if !defined(OS_WIN) |
628 if (!pairing_registry_) { | 628 if (!pairing_registry_) { |
629 scoped_ptr<PairingRegistry::Delegate> delegate = | 629 scoped_ptr<PairingRegistry::Delegate> delegate = |
630 CreatePairingRegistryDelegate(); | 630 CreatePairingRegistryDelegate(); |
631 | 631 |
632 pairing_registry_ = new PairingRegistry(context_->file_task_runner(), | 632 if (delegate) |
633 delegate.Pass()); | 633 pairing_registry_ = new PairingRegistry(context_->file_task_runner(), |
| 634 delegate.Pass()); |
634 } | 635 } |
635 #endif // defined(OS_WIN) | 636 #endif // defined(OS_WIN) |
636 | 637 |
637 pairing_registry = pairing_registry_; | 638 pairing_registry = pairing_registry_; |
638 } | 639 } |
639 | 640 |
640 factory = protocol::Me2MeHostAuthenticatorFactory::CreateWithSharedSecret( | 641 factory = protocol::Me2MeHostAuthenticatorFactory::CreateWithSharedSecret( |
641 use_service_account_, host_owner_, local_certificate, key_pair_, | 642 use_service_account_, host_owner_, local_certificate, key_pair_, |
642 host_secret_hash_, pairing_registry); | 643 host_secret_hash_, pairing_registry); |
643 | 644 |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1540 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); | 1541 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); |
1541 new HostProcess(context.Pass(), &exit_code, &shutdown_watchdog); | 1542 new HostProcess(context.Pass(), &exit_code, &shutdown_watchdog); |
1542 | 1543 |
1543 // Run the main (also UI) message loop until the host no longer needs it. | 1544 // Run the main (also UI) message loop until the host no longer needs it. |
1544 message_loop.Run(); | 1545 message_loop.Run(); |
1545 | 1546 |
1546 return exit_code; | 1547 return exit_code; |
1547 } | 1548 } |
1548 | 1549 |
1549 } // namespace remoting | 1550 } // namespace remoting |
OLD | NEW |