| 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 #ifndef REMOTING_HOST_HOST_STARTER | 5 #ifndef REMOTING_HOST_HOST_STARTER |
| 6 #define REMOTING_HOST_HOST_STARTER | 6 #define REMOTING_HOST_HOST_STARTER |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/weak_ptr.h" |
| 12 #include "google_apis/gaia/gaia_oauth_client.h" | 13 #include "google_apis/gaia/gaia_oauth_client.h" |
| 13 #include "remoting/base/rsa_key_pair.h" | 14 #include "remoting/base/rsa_key_pair.h" |
| 14 #include "remoting/base/url_request_context.h" | |
| 15 #include "remoting/host/setup/daemon_controller.h" | 15 #include "remoting/host/setup/daemon_controller.h" |
| 16 #include "remoting/host/setup/service_client.h" | 16 #include "remoting/host/setup/service_client.h" |
| 17 | 17 |
| 18 namespace net { |
| 19 class URLRequestContextGetter; |
| 20 } |
| 21 |
| 18 namespace remoting { | 22 namespace remoting { |
| 19 | 23 |
| 20 // A helper class that registers and starts a host. | 24 // A helper class that registers and starts a host. |
| 21 class HostStarter : public gaia::GaiaOAuthClient::Delegate, | 25 class HostStarter : public gaia::GaiaOAuthClient::Delegate, |
| 22 public remoting::ServiceClient::Delegate { | 26 public remoting::ServiceClient::Delegate { |
| 23 public: | 27 public: |
| 24 enum Result { | 28 enum Result { |
| 25 START_COMPLETE, | 29 START_COMPLETE, |
| 26 NETWORK_ERROR, | 30 NETWORK_ERROR, |
| 27 OAUTH_ERROR, | 31 OAUTH_ERROR, |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 103 |
| 100 base::WeakPtr<HostStarter> weak_ptr_; | 104 base::WeakPtr<HostStarter> weak_ptr_; |
| 101 base::WeakPtrFactory<HostStarter> weak_ptr_factory_; | 105 base::WeakPtrFactory<HostStarter> weak_ptr_factory_; |
| 102 | 106 |
| 103 DISALLOW_COPY_AND_ASSIGN(HostStarter); | 107 DISALLOW_COPY_AND_ASSIGN(HostStarter); |
| 104 }; | 108 }; |
| 105 | 109 |
| 106 } // namespace remoting | 110 } // namespace remoting |
| 107 | 111 |
| 108 #endif // REMOTING_HOST_HOST_STARTER | 112 #endif // REMOTING_HOST_HOST_STARTER |
| OLD | NEW |