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

Unified Diff: remoting/client/plugin/chromoting_instance.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: Added errors.cc and cleaned up switch statements. 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 | « no previous file | remoting/protocol/connection_to_host.h » ('j') | remoting/protocol/connection_to_host.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/chromoting_instance.cc
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 9e8c291fe6f3dbc5fb8312bfcb497b1dd15a97d9..cbdd17b85b2caf2239405cae9b05d125db331637 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -98,27 +98,6 @@ const int kBandwidthHistogramBuckets = 100;
const int kRandomSeedSize = 1024;
#endif // defined(USE_OPENSSL)
-std::string ConnectionStateToString(protocol::ConnectionToHost::State state) {
- // Values returned by this function must match the
- // remoting.ClientSession.State enum in JS code.
- switch (state) {
- case protocol::ConnectionToHost::INITIALIZING:
- return "INITIALIZING";
- case protocol::ConnectionToHost::CONNECTING:
- return "CONNECTING";
- case protocol::ConnectionToHost::AUTHENTICATED:
- return "AUTHENTICATED";
- case protocol::ConnectionToHost::CONNECTED:
- return "CONNECTED";
- case protocol::ConnectionToHost::CLOSED:
- return "CLOSED";
- case protocol::ConnectionToHost::FAILED:
- return "FAILED";
- }
- NOTREACHED();
- return std::string();
-}
-
// TODO(sergeyu): Ideally we should just pass ErrorCode to the webapp
// and let it handle it, but it would be hard to fix it now because
// client plugin and webapp versions may not be in sync. It should be
@@ -486,7 +465,7 @@ void ChromotingInstance::OnConnectionState(
protocol::ConnectionToHost::State state,
protocol::ErrorCode error) {
scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue());
- data->SetString("state", ConnectionStateToString(state));
+ data->SetString("state", protocol::ConnectionToHost::StateToString(state));
data->SetString("error", ConnectionErrorToString(error));
PostLegacyJsonMessage("onConnectionStatus", data.Pass());
}
« no previous file with comments | « no previous file | remoting/protocol/connection_to_host.h » ('j') | remoting/protocol/connection_to_host.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698