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

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

Issue 1004513002: Eliminated named constants for instances of remoting.Error. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 * A class of server log entries. 7 * A class of server log entries.
8 * 8 *
9 * Any changes to the values here need to be coordinated with the host and 9 * Any changes to the values here need to be coordinated with the host and
10 * server/log proto code. 10 * server/log proto code.
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 */ 224 */
225 remoting.ServerLogEntry.makeClientSessionStateChange = function(state, 225 remoting.ServerLogEntry.makeClientSessionStateChange = function(state,
226 connectionError, mode) { 226 connectionError, mode) {
227 var entry = new remoting.ServerLogEntry(); 227 var entry = new remoting.ServerLogEntry();
228 entry.set_(remoting.ServerLogEntry.KEY_ROLE_, 228 entry.set_(remoting.ServerLogEntry.KEY_ROLE_,
229 remoting.ServerLogEntry.VALUE_ROLE_CLIENT_); 229 remoting.ServerLogEntry.VALUE_ROLE_CLIENT_);
230 entry.set_(remoting.ServerLogEntry.KEY_EVENT_NAME_, 230 entry.set_(remoting.ServerLogEntry.KEY_EVENT_NAME_,
231 remoting.ServerLogEntry.VALUE_EVENT_NAME_SESSION_STATE_); 231 remoting.ServerLogEntry.VALUE_EVENT_NAME_SESSION_STATE_);
232 entry.set_(remoting.ServerLogEntry.KEY_SESSION_STATE_, 232 entry.set_(remoting.ServerLogEntry.KEY_SESSION_STATE_,
233 remoting.ServerLogEntry.getValueForSessionState_(state)); 233 remoting.ServerLogEntry.getValueForSessionState_(state));
234 if (connectionError.tag != remoting.Error.NONE) { 234 if (connectionError.tag.isError()) {
Jamie 2015/03/11 22:16:38 isError() is a method on Error, not Tag?
John Williams 2015/03/12 02:46:20 Done.
235 entry.set_(remoting.ServerLogEntry.KEY_CONNECTION_ERROR_, 235 entry.set_(remoting.ServerLogEntry.KEY_CONNECTION_ERROR_,
236 remoting.ServerLogEntry.getValueForError_(connectionError)); 236 remoting.ServerLogEntry.getValueForError_(connectionError));
237 } 237 }
238 entry.addModeField(mode); 238 entry.addModeField(mode);
239 return entry; 239 return entry;
240 }; 240 };
241 241
242 /** 242 /**
243 * Makes a log entry for a set of connection statistics. 243 * Makes a log entry for a set of connection statistics.
244 * Returns null if all the statistics were zero. 244 * Returns null if all the statistics were zero.
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 case remoting.DesktopConnectedView.Mode.IT2ME: 504 case remoting.DesktopConnectedView.Mode.IT2ME:
505 return remoting.ServerLogEntry.VALUE_MODE_IT2ME_; 505 return remoting.ServerLogEntry.VALUE_MODE_IT2ME_;
506 case remoting.DesktopConnectedView.Mode.ME2ME: 506 case remoting.DesktopConnectedView.Mode.ME2ME:
507 return remoting.ServerLogEntry.VALUE_MODE_ME2ME_; 507 return remoting.ServerLogEntry.VALUE_MODE_ME2ME_;
508 case remoting.DesktopConnectedView.Mode.APP_REMOTING: 508 case remoting.DesktopConnectedView.Mode.APP_REMOTING:
509 return remoting.ServerLogEntry.VALUE_MODE_APP_REMOTING_; 509 return remoting.ServerLogEntry.VALUE_MODE_APP_REMOTING_;
510 default: 510 default:
511 return remoting.ServerLogEntry.VALUE_MODE_UNKNOWN_; 511 return remoting.ServerLogEntry.VALUE_MODE_UNKNOWN_;
512 } 512 }
513 }; 513 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698