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" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 void OnOAuthError() override; | 70 void OnOAuthError() override; |
71 void OnNetworkError(int response_code) override; | 71 void OnNetworkError(int response_code) override; |
72 | 72 |
73 private: | 73 private: |
74 HostStarter(scoped_ptr<gaia::GaiaOAuthClient> oauth_client, | 74 HostStarter(scoped_ptr<gaia::GaiaOAuthClient> oauth_client, |
75 scoped_ptr<remoting::ServiceClient> service_client, | 75 scoped_ptr<remoting::ServiceClient> service_client, |
76 scoped_refptr<remoting::DaemonController> daemon_controller); | 76 scoped_refptr<remoting::DaemonController> daemon_controller); |
77 | 77 |
78 void StartHostProcess(); | 78 void StartHostProcess(); |
79 | 79 |
80 void OnHostStarted(DaemonController::AsyncResult result); | 80 void OnStartHostSucceeded(); |
| 81 void OnStartHostFailed(const std::string& error_message, |
| 82 const tracked_objects::Location& location); |
81 | 83 |
82 scoped_ptr<gaia::GaiaOAuthClient> oauth_client_; | 84 scoped_ptr<gaia::GaiaOAuthClient> oauth_client_; |
83 scoped_ptr<remoting::ServiceClient> service_client_; | 85 scoped_ptr<remoting::ServiceClient> service_client_; |
84 scoped_refptr<remoting::DaemonController> daemon_controller_; | 86 scoped_refptr<remoting::DaemonController> daemon_controller_; |
85 gaia::OAuthClientInfo oauth_client_info_; | 87 gaia::OAuthClientInfo oauth_client_info_; |
86 std::string host_name_; | 88 std::string host_name_; |
87 std::string host_pin_; | 89 std::string host_pin_; |
88 bool consent_to_data_collection_; | 90 bool consent_to_data_collection_; |
89 CompletionCallback on_done_; | 91 CompletionCallback on_done_; |
90 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 92 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
(...skipping 11 matching lines...) Expand all Loading... |
102 | 104 |
103 base::WeakPtr<HostStarter> weak_ptr_; | 105 base::WeakPtr<HostStarter> weak_ptr_; |
104 base::WeakPtrFactory<HostStarter> weak_ptr_factory_; | 106 base::WeakPtrFactory<HostStarter> weak_ptr_factory_; |
105 | 107 |
106 DISALLOW_COPY_AND_ASSIGN(HostStarter); | 108 DISALLOW_COPY_AND_ASSIGN(HostStarter); |
107 }; | 109 }; |
108 | 110 |
109 } // namespace remoting | 111 } // namespace remoting |
110 | 112 |
111 #endif // REMOTING_HOST_HOST_STARTER | 113 #endif // REMOTING_HOST_HOST_STARTER |
OLD | NEW |