Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3212)

Unified Diff: blimp/client/core/blimp_client_context_impl.cc

Issue 2322843002: Propagate connection info to Blimp android UI. (Closed)
Patch Set: Merge conflicts. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « blimp/client/core/blimp_client_context_impl.h ('k') | blimp/client/core/session/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « blimp/client/core/blimp_client_context_impl.h ('k') | blimp/client/core/session/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698