Chromium Code Reviews| Index: blimp/client/core/blimp_client_context_impl.cc |
| diff --git a/blimp/client/core/blimp_client_context_impl.cc b/blimp/client/core/blimp_client_context_impl.cc |
| index 03e447668e88505c94d75d2cb33e080dafa1f93f..13168bc87c83241d23a1dc0dfd21df26441a9bc9 100644 |
| --- a/blimp/client/core/blimp_client_context_impl.cc |
| +++ b/blimp/client/core/blimp_client_context_impl.cc |
| @@ -143,9 +143,13 @@ void BlimpClientContextImpl::ConnectToAssignmentSource( |
| weak_factory_.GetWeakPtr())); |
| } |
| -void BlimpClientContextImpl::OnConnected() {} |
| +void BlimpClientContextImpl::OnConnected() { |
|
David Trainor- moved to gerrit
2016/09/09 19:33:47
Get rid of these and make ConnectionStatus the Net
xingliu
2016/09/10 22:45:46
Make sense. Done.
|
| + connection_status_.OnConnected(); |
| +} |
| -void BlimpClientContextImpl::OnDisconnected(int result) {} |
| +void BlimpClientContextImpl::OnDisconnected(int result) { |
| + connection_status_.OnDisconnected(result); |
| +} |
| GURL BlimpClientContextImpl::GetAssignerURL() { |
| return GURL(kDefaultAssignerUrl); |
| @@ -158,11 +162,19 @@ IdentitySource* BlimpClientContextImpl::GetIdentitySource() { |
| return identity_source_.get(); |
| } |
| +ConnectionStatus* BlimpClientContextImpl::GetConnectionStatus() { |
| + return &connection_status_; |
| +} |
| + |
| void BlimpClientContextImpl::ConnectWithAssignment( |
| AssignmentRequestResult result, |
| const Assignment& assignment) { |
| VLOG(1) << "Assignment result: " << result; |
| + // Cache engine info. |
| + connection_status_.onAssignmentResult(result, assignment); |
| + |
| + // Inform the embedder of the assignment result. |
| if (delegate_) { |
| delegate_->OnAssignmentConnectionAttempted(result, assignment); |
| } |
| @@ -172,6 +184,7 @@ void BlimpClientContextImpl::ConnectWithAssignment( |
| return; |
| } |
| + // If we get the assignment, connect to engine. |
| io_thread_task_runner_->PostTask( |
| FROM_HERE, |
| base::Bind(&ClientNetworkComponents::ConnectWithAssignment, |