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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 }; | 225 }; |
226 | 226 |
227 // Factory for Authenticator instances. | 227 // Factory for Authenticator instances. |
228 class NoopAuthenticatorFactory : public protocol::AuthenticatorFactory { | 228 class NoopAuthenticatorFactory : public protocol::AuthenticatorFactory { |
229 public: | 229 public: |
230 NoopAuthenticatorFactory() {} | 230 NoopAuthenticatorFactory() {} |
231 ~NoopAuthenticatorFactory() override {} | 231 ~NoopAuthenticatorFactory() override {} |
232 | 232 |
233 scoped_ptr<protocol::Authenticator> CreateAuthenticator( | 233 scoped_ptr<protocol::Authenticator> CreateAuthenticator( |
234 const std::string& local_jid, | 234 const std::string& local_jid, |
235 const std::string& remote_jid, | 235 const std::string& remote_jid) override { |
236 const buzz::XmlElement* first_message) override { | |
237 return make_scoped_ptr(new NoopAuthenticator()); | 236 return make_scoped_ptr(new NoopAuthenticator()); |
238 } | 237 } |
239 }; | 238 }; |
240 | 239 |
241 #endif // !defined(NDEBUG) | 240 #endif // !defined(NDEBUG) |
242 | 241 |
243 class HostProcess : public ConfigWatcher::Delegate, | 242 class HostProcess : public ConfigWatcher::Delegate, |
244 public HostChangeNotificationListener::Listener, | 243 public HostChangeNotificationListener::Listener, |
245 public IPC::Listener, | 244 public IPC::Listener, |
246 public base::RefCountedThreadSafe<HostProcess> { | 245 public base::RefCountedThreadSafe<HostProcess> { |
(...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1745 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); | 1744 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); |
1746 new HostProcess(std::move(context), &exit_code, &shutdown_watchdog); | 1745 new HostProcess(std::move(context), &exit_code, &shutdown_watchdog); |
1747 | 1746 |
1748 // Run the main (also UI) message loop until the host no longer needs it. | 1747 // Run the main (also UI) message loop until the host no longer needs it. |
1749 message_loop.Run(); | 1748 message_loop.Run(); |
1750 | 1749 |
1751 return exit_code; | 1750 return exit_code; |
1752 } | 1751 } |
1753 | 1752 |
1754 } // namespace remoting | 1753 } // namespace remoting |
OLD | NEW |