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

Side by Side Diff: remoting/webapp/crd/js/log_to_server.js

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 | « remoting/webapp/crd/js/client_session.js ('k') | remoting/webapp/crd/js/server_log_entry.js » ('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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Module for sending log entries to the server. 7 * Module for sending log entries to the server.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 * Whether a session state is one of the states that occurs at the start of 102 * Whether a session state is one of the states that occurs at the start of
103 * a session. 103 * a session.
104 * 104 *
105 * @private 105 * @private
106 * @param {remoting.ClientSession.State} state 106 * @param {remoting.ClientSession.State} state
107 * @return {boolean} 107 * @return {boolean}
108 */ 108 */
109 remoting.LogToServer.isStartOfSession_ = function(state) { 109 remoting.LogToServer.isStartOfSession_ = function(state) {
110 return ((state == remoting.ClientSession.State.CONNECTING) || 110 return ((state == remoting.ClientSession.State.CONNECTING) ||
111 (state == remoting.ClientSession.State.INITIALIZING) || 111 (state == remoting.ClientSession.State.INITIALIZING) ||
112 (state == remoting.ClientSession.State.AUTHENTICATED) ||
112 (state == remoting.ClientSession.State.CONNECTED)); 113 (state == remoting.ClientSession.State.CONNECTED));
113 }; 114 };
114 115
115 /** 116 /**
116 * Whether a session state is one of the states that occurs at the end of 117 * Whether a session state is one of the states that occurs at the end of
117 * a session. 118 * a session.
118 * 119 *
119 * @private 120 * @private
120 * @param {remoting.ClientSession.State} state 121 * @param {remoting.ClientSession.State} state
121 * @return {boolean} 122 * @return {boolean}
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 remoting.LogToServer.generateSessionId_ = function() { 246 remoting.LogToServer.generateSessionId_ = function() {
246 var idArray = []; 247 var idArray = [];
247 for (var i = 0; i < remoting.LogToServer.SESSION_ID_LEN_; i++) { 248 for (var i = 0; i < remoting.LogToServer.SESSION_ID_LEN_; i++) {
248 var index = 249 var index =
249 Math.random() * remoting.LogToServer.SESSION_ID_ALPHABET_.length; 250 Math.random() * remoting.LogToServer.SESSION_ID_ALPHABET_.length;
250 idArray.push( 251 idArray.push(
251 remoting.LogToServer.SESSION_ID_ALPHABET_.slice(index, index + 1)); 252 remoting.LogToServer.SESSION_ID_ALPHABET_.slice(index, index + 1));
252 } 253 }
253 return idArray.join(''); 254 return idArray.join('');
254 }; 255 };
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/client_session.js ('k') | remoting/webapp/crd/js/server_log_entry.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698