| 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 4f061abe9be7f1c18905b88eab28a5ef0c70592d..246d78d4b8f24cfd71c33fbaa06f981d7b87b400 100644
|
| --- a/blimp/client/core/blimp_client_context_impl.cc
|
| +++ b/blimp/client/core/blimp_client_context_impl.cc
|
| @@ -90,7 +90,8 @@ BlimpClientContextImpl::BlimpClientContextImpl(
|
| weak_factory_(this) {
|
| net_components_.reset(new ClientNetworkComponents(
|
| base::MakeUnique<CrossThreadNetworkEventObserver>(
|
| - weak_factory_.GetWeakPtr(), base::SequencedTaskRunnerHandle::Get())));
|
| + connection_status_.GetWeakPtr(),
|
| + base::SequencedTaskRunnerHandle::Get())));
|
|
|
| // The |thread_pipe_manager_| must be set up correctly before features are
|
| // registered.
|
| @@ -154,14 +155,6 @@ void BlimpClientContextImpl::OnAuthTokenReceived(
|
| weak_factory_.GetWeakPtr()));
|
| }
|
|
|
| -void BlimpClientContextImpl::OnConnected() {
|
| - UMA_HISTOGRAM_BOOLEAN("Blimp.Connected", true);
|
| -}
|
| -
|
| -void BlimpClientContextImpl::OnDisconnected(int result) {
|
| - UMA_HISTOGRAM_BOOLEAN("Blimp.Connected", false);
|
| -}
|
| -
|
| GURL BlimpClientContextImpl::GetAssignerURL() {
|
| return GURL(kDefaultAssignerUrl);
|
| }
|
| @@ -173,11 +166,19 @@ IdentitySource* BlimpClientContextImpl::GetIdentitySource() {
|
| return identity_source_.get();
|
| }
|
|
|
| +ConnectionStatus* BlimpClientContextImpl::GetConnectionStatus() {
|
| + return &connection_status_;
|
| +}
|
| +
|
| void BlimpClientContextImpl::OnAssignmentReceived(
|
| 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);
|
| }
|
|
|