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

Side by Side Diff: remoting/client/plugin/chromoting_instance.cc

Issue 1032553008: [Chromoting] Update client connection enums in JS to match C++. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace ClientSession.State.CREATED with INITIALIZING Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | remoting/protocol/connection_to_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/client/plugin/chromoting_instance.h" 5 #include "remoting/client/plugin/chromoting_instance.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #if defined(OS_NACL) 10 #if defined(OS_NACL)
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // Values returned by this function must match the 84 // Values returned by this function must match the
85 // remoting.ClientSession.State enum in JS code. 85 // remoting.ClientSession.State enum in JS code.
86 switch (state) { 86 switch (state) {
87 case protocol::ConnectionToHost::INITIALIZING: 87 case protocol::ConnectionToHost::INITIALIZING:
88 return "INITIALIZING"; 88 return "INITIALIZING";
89 case protocol::ConnectionToHost::CONNECTING: 89 case protocol::ConnectionToHost::CONNECTING:
90 return "CONNECTING"; 90 return "CONNECTING";
91 case protocol::ConnectionToHost::AUTHENTICATED: 91 case protocol::ConnectionToHost::AUTHENTICATED:
92 // Report the authenticated state as 'CONNECTING' to avoid changing 92 // Report the authenticated state as 'CONNECTING' to avoid changing
93 // the interface between the plugin and webapp. 93 // the interface between the plugin and webapp.
94 // TODO(garykac) Change to 'AUTHENTICATED' in M44 or once we've switched
95 // the client to NaCl.
94 return "CONNECTING"; 96 return "CONNECTING";
95 case protocol::ConnectionToHost::CONNECTED: 97 case protocol::ConnectionToHost::CONNECTED:
96 return "CONNECTED"; 98 return "CONNECTED";
97 case protocol::ConnectionToHost::CLOSED: 99 case protocol::ConnectionToHost::CLOSED:
98 return "CLOSED"; 100 return "CLOSED";
99 case protocol::ConnectionToHost::FAILED: 101 case protocol::ConnectionToHost::FAILED:
100 return "FAILED"; 102 return "FAILED";
101 } 103 }
102 NOTREACHED(); 104 NOTREACHED();
103 return std::string(); 105 return std::string();
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 1190
1189 #if !defined(OS_NACL) 1191 #if !defined(OS_NACL)
1190 // Log messages are forwarded to the webapp only in PNaCl version of the 1192 // Log messages are forwarded to the webapp only in PNaCl version of the
1191 // plugin, so ProcessLogToUI() needs to be called explicitly in the non-PNaCl 1193 // plugin, so ProcessLogToUI() needs to be called explicitly in the non-PNaCl
1192 // version. 1194 // version.
1193 ProcessLogToUI(message); 1195 ProcessLogToUI(message);
1194 #endif // !defined(OS_NACL) 1196 #endif // !defined(OS_NACL)
1195 } 1197 }
1196 1198
1197 } // namespace remoting 1199 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/protocol/connection_to_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698