| 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 "google_apis/gaia/gaia_oauth_client.h" | 11 #include "google_apis/gaia/gaia_oauth_client.h" |
| 12 #include "remoting/host/host_key_pair.h" | |
| 13 #include "remoting/host/service_client.h" | 12 #include "remoting/host/service_client.h" |
| 14 #include "remoting/host/setup/daemon_controller.h" | 13 #include "remoting/host/setup/daemon_controller.h" |
| 15 #include "remoting/host/url_request_context.h" | 14 #include "remoting/host/url_request_context.h" |
| 15 #include "remoting/protocol/key_pair.h" |
| 16 | 16 |
| 17 namespace remoting { | 17 namespace remoting { |
| 18 | 18 |
| 19 // A helper class that registers and starts a host. | 19 // A helper class that registers and starts a host. |
| 20 class HostStarter : public gaia::GaiaOAuthClient::Delegate, | 20 class HostStarter : public gaia::GaiaOAuthClient::Delegate, |
| 21 public remoting::ServiceClient::Delegate { | 21 public remoting::ServiceClient::Delegate { |
| 22 public: | 22 public: |
| 23 enum Result { | 23 enum Result { |
| 24 START_COMPLETE, | 24 START_COMPLETE, |
| 25 NETWORK_ERROR, | 25 NETWORK_ERROR, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 scoped_ptr<remoting::DaemonController> daemon_controller_; | 78 scoped_ptr<remoting::DaemonController> daemon_controller_; |
| 79 gaia::OAuthClientInfo oauth_client_info_; | 79 gaia::OAuthClientInfo oauth_client_info_; |
| 80 std::string host_name_; | 80 std::string host_name_; |
| 81 std::string host_pin_; | 81 std::string host_pin_; |
| 82 bool consent_to_data_collection_; | 82 bool consent_to_data_collection_; |
| 83 CompletionCallback on_done_; | 83 CompletionCallback on_done_; |
| 84 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 84 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
| 85 std::string refresh_token_; | 85 std::string refresh_token_; |
| 86 std::string access_token_; | 86 std::string access_token_; |
| 87 std::string user_email_; | 87 std::string user_email_; |
| 88 remoting::HostKeyPair key_pair_; | 88 remoting::protocol::KeyPair key_pair_; |
| 89 std::string host_id_; | 89 std::string host_id_; |
| 90 | 90 |
| 91 base::WeakPtrFactory<HostStarter> weak_ptr_factory_; | 91 base::WeakPtrFactory<HostStarter> weak_ptr_factory_; |
| 92 base::WeakPtr<HostStarter> weak_ptr_; | 92 base::WeakPtr<HostStarter> weak_ptr_; |
| 93 | 93 |
| 94 DISALLOW_COPY_AND_ASSIGN(HostStarter); | 94 DISALLOW_COPY_AND_ASSIGN(HostStarter); |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 } // namespace remoting | 97 } // namespace remoting |
| 98 | 98 |
| 99 #endif // REMOTING_HOST_HOST_STARTER | 99 #endif // REMOTING_HOST_HOST_STARTER |
| OLD | NEW |