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

Unified Diff: remoting/protocol/connection_to_host_impl.cc

Issue 1238343002: Added ConnectionTimeObserver to calculate the times to authenticate and connect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unused headers. Created 5 years, 5 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 | « remoting/protocol/connection_to_host.h ('k') | remoting/protocol/errors.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/connection_to_host_impl.cc
diff --git a/remoting/protocol/connection_to_host_impl.cc b/remoting/protocol/connection_to_host_impl.cc
index f4cef0c125c8554833cd9af19595f8ff2681f9a8..b6dac130a47b949ac6cf9c4b7c2682ddb9a3bb7f 100644
--- a/remoting/protocol/connection_to_host_impl.cc
+++ b/remoting/protocol/connection_to_host_impl.cc
@@ -48,6 +48,23 @@ ConnectionToHostImpl::~ConnectionToHostImpl() {
signal_strategy_->RemoveListener(this);
}
+#define RETURN_STRING_LITERAL(x) \
+case x: \
+return #x;
+
+const char* ConnectionToHost::StateToString(State state) {
+ switch (state) {
+ RETURN_STRING_LITERAL(INITIALIZING);
+ RETURN_STRING_LITERAL(CONNECTING);
+ RETURN_STRING_LITERAL(AUTHENTICATED);
+ RETURN_STRING_LITERAL(CONNECTED);
+ RETURN_STRING_LITERAL(CLOSED);
+ RETURN_STRING_LITERAL(FAILED);
+ }
+ NOTREACHED();
+ return nullptr;
+}
+
void ConnectionToHostImpl::Connect(
SignalStrategy* signal_strategy,
scoped_ptr<TransportFactory> transport_factory,
« no previous file with comments | « remoting/protocol/connection_to_host.h ('k') | remoting/protocol/errors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698