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

Unified Diff: blimp/client/core/session/connection_status.cc

Issue 2624903006: Remove all blimp client code. (Closed)
Patch Set: Update buildbot configuration Created 3 years, 11 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
Index: blimp/client/core/session/connection_status.cc
diff --git a/blimp/client/core/session/connection_status.cc b/blimp/client/core/session/connection_status.cc
deleted file mode 100644
index 069dcbb684a10e622d5b755aed10fcb851225147..0000000000000000000000000000000000000000
--- a/blimp/client/core/session/connection_status.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "blimp/client/core/session/connection_status.h"
-
-#include "base/metrics/histogram_macros.h"
-
-namespace blimp {
-namespace client {
-
-ConnectionStatus::ConnectionStatus()
- : is_connected_(false), weak_factory_(this) {}
-
-ConnectionStatus::~ConnectionStatus() = default;
-
-void ConnectionStatus::AddObserver(NetworkEventObserver* observer) {
- connection_observers_.AddObserver(observer);
-}
-
-void ConnectionStatus::RemoveObserver(NetworkEventObserver* observer) {
- connection_observers_.RemoveObserver(observer);
-}
-
-void ConnectionStatus::OnAssignmentResult(int result,
- const Assignment& assignment) {
- if (result == AssignmentRequestResult::ASSIGNMENT_REQUEST_RESULT_OK) {
- engine_endpoint_ = assignment.engine_endpoint;
- }
-}
-
-base::WeakPtr<ConnectionStatus> ConnectionStatus::GetWeakPtr() {
- return weak_factory_.GetWeakPtr();
-}
-
-void ConnectionStatus::OnConnected() {
- is_connected_ = true;
- UMA_HISTOGRAM_BOOLEAN("Blimp.Connected", true);
- for (auto& observer : connection_observers_)
- observer.OnConnected();
-}
-
-void ConnectionStatus::OnDisconnected(int result) {
- is_connected_ = false;
- UMA_HISTOGRAM_BOOLEAN("Blimp.Connected", false);
- for (auto& observer : connection_observers_)
- observer.OnDisconnected(result);
-}
-
-} // namespace client
-} // namespace blimp
« no previous file with comments | « blimp/client/core/session/connection_status.h ('k') | blimp/client/core/session/cross_thread_network_event_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698