Chromium Code Reviews| Index: remoting/host/it2me/it2me_host.cc |
| diff --git a/remoting/host/it2me/it2me_host.cc b/remoting/host/it2me/it2me_host.cc |
| index e1c7a5fea255bad73b86a8744c0a7c2cdc33a559..0f5ab20c2c54993be7caf58f2d3689c926902aec 100644 |
| --- a/remoting/host/it2me/it2me_host.cc |
| +++ b/remoting/host/it2me/it2me_host.cc |
| @@ -404,14 +404,17 @@ void It2MeHost::SetState(It2MeHostState state, |
| state == kError) << state; |
| break; |
| case kReceivedAccessCode: |
| - DCHECK(state == kConnected || |
| - state == kDisconnected || |
| - state == kError) << state; |
| + DCHECK(state == kConnecting || state == kDisconnected || state == kError) |
| + << state; |
| break; |
| case kConnected: |
| DCHECK(state == kDisconnected || |
| state == kError) << state; |
| break; |
| + case kConnecting: |
|
Sergey Ulanov
2016/10/27 22:44:12
Put kConnecting before kConnected
joedow
2016/10/31 17:16:07
Done.
|
| + DCHECK(state == kConnected || state == kDisconnected || state == kError) |
| + << state; |
| + break; |
| case kError: |
| DCHECK(state == kDisconnected) << state; |
| break; |
| @@ -430,7 +433,7 @@ void It2MeHost::SetState(It2MeHostState state, |
| bool It2MeHost::IsConnected() const { |
|
Sergey Ulanov
2016/10/27 22:44:12
This doesn't look like the right name for this met
joedow
2016/10/31 17:16:07
Changed. Agreed that IsConnected is ambiguous sin
|
| return state_ == kRequestedAccessCode || state_ == kReceivedAccessCode || |
| - state_ == kConnected; |
| + state_ == kConnected || state_ == kConnecting; |
| } |
| void It2MeHost::OnReceivedSupportID( |
| @@ -511,6 +514,9 @@ void It2MeHost::ValidateConnectionDetails( |
| } |
| } |
| + HOST_LOG << "Client " << client_username << " connecting."; |
| + SetState(kConnecting, std::string()); |
| + |
| // Show a confirmation dialog to the user to allow them to confirm/reject it. |
| confirmation_dialog_proxy_.reset(new It2MeConfirmationDialogProxy( |
| host_context_->ui_task_runner(), std::move(confirmation_dialog_))); |