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

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

Issue 1066003007: Include application ID in log entries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to pick up latest changes. Created 5 years, 7 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/log_to_server.js ('k') | no next file » | 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 * 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 remoting.ServerLogEntry.KEY_MODE_ = 'mode'; 171 remoting.ServerLogEntry.KEY_MODE_ = 'mode';
172 /** @private */ 172 /** @private */
173 remoting.ServerLogEntry.VALUE_MODE_IT2ME_ = 'it2me'; 173 remoting.ServerLogEntry.VALUE_MODE_IT2ME_ = 'it2me';
174 /** @private */ 174 /** @private */
175 remoting.ServerLogEntry.VALUE_MODE_ME2ME_ = 'me2me'; 175 remoting.ServerLogEntry.VALUE_MODE_ME2ME_ = 'me2me';
176 /** @private */ 176 /** @private */
177 remoting.ServerLogEntry.VALUE_MODE_APP_REMOTING_ = 'lgapp'; 177 remoting.ServerLogEntry.VALUE_MODE_APP_REMOTING_ = 'lgapp';
178 /** @private */ 178 /** @private */
179 remoting.ServerLogEntry.VALUE_MODE_UNKNOWN_ = 'unknown'; 179 remoting.ServerLogEntry.VALUE_MODE_UNKNOWN_ = 'unknown';
180 180
181 /** @private */
182 remoting.ServerLogEntry.KEY_APP_ID_ = 'application-id';
183
181 /** 184 /**
182 * Sets one field in this log entry. 185 * Sets one field in this log entry.
183 * 186 *
184 * @private 187 * @private
185 * @param {string} key 188 * @param {string} key
186 * @param {string} value 189 * @param {string} value
187 */ 190 */
188 remoting.ServerLogEntry.prototype.set_ = function(key, value) { 191 remoting.ServerLogEntry.prototype.set_ = function(key, value) {
189 this.dict[key] = value; 192 this.dict[key] = value;
190 }; 193 };
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 493
491 /** 494 /**
492 * Adds a field specifying the mode to this log entry. 495 * Adds a field specifying the mode to this log entry.
493 */ 496 */
494 remoting.ServerLogEntry.prototype.addModeField = function() { 497 remoting.ServerLogEntry.prototype.addModeField = function() {
495 this.set_(remoting.ServerLogEntry.KEY_MODE_, 498 this.set_(remoting.ServerLogEntry.KEY_MODE_,
496 remoting.ServerLogEntry.getModeField_()); 499 remoting.ServerLogEntry.getModeField_());
497 }; 500 };
498 501
499 /** 502 /**
503 * Adds a field specifying the application ID to this log entry.
504 * @return {void} Nothing.
505 */
506 remoting.ServerLogEntry.prototype.addApplicationId = function() {
507 this.set_(remoting.ServerLogEntry.KEY_APP_ID_, chrome.runtime.id);
508 };
509
510
511 /**
500 * Gets the value of the mode field to be put in a log entry. 512 * Gets the value of the mode field to be put in a log entry.
501 * 513 *
502 * @private 514 * @private
503 * @return {string} 515 * @return {string}
504 */ 516 */
505 remoting.ServerLogEntry.getModeField_ = function() { 517 remoting.ServerLogEntry.getModeField_ = function() {
506 switch(remoting.app.getConnectionMode()) { 518 switch(remoting.app.getConnectionMode()) {
507 case remoting.Application.Mode.IT2ME: 519 case remoting.Application.Mode.IT2ME:
508 return remoting.ServerLogEntry.VALUE_MODE_IT2ME_; 520 return remoting.ServerLogEntry.VALUE_MODE_IT2ME_;
509 case remoting.Application.Mode.ME2ME: 521 case remoting.Application.Mode.ME2ME:
510 return remoting.ServerLogEntry.VALUE_MODE_ME2ME_; 522 return remoting.ServerLogEntry.VALUE_MODE_ME2ME_;
511 case remoting.Application.Mode.APP_REMOTING: 523 case remoting.Application.Mode.APP_REMOTING:
512 return remoting.ServerLogEntry.VALUE_MODE_APP_REMOTING_; 524 return remoting.ServerLogEntry.VALUE_MODE_APP_REMOTING_;
513 default: 525 default:
514 return remoting.ServerLogEntry.VALUE_MODE_UNKNOWN_; 526 return remoting.ServerLogEntry.VALUE_MODE_UNKNOWN_;
515 } 527 }
516 }; 528 };
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/log_to_server.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698