| OLD | NEW |
| 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 | 9 |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 return match[1]; | 445 return match[1]; |
| 446 } | 446 } |
| 447 return null; | 447 return null; |
| 448 }; | 448 }; |
| 449 | 449 |
| 450 /** | 450 /** |
| 451 * Adds a field specifying the webapp version to this log entry. | 451 * Adds a field specifying the webapp version to this log entry. |
| 452 */ | 452 */ |
| 453 remoting.ServerLogEntry.prototype.addWebappVersionField = function() { | 453 remoting.ServerLogEntry.prototype.addWebappVersionField = function() { |
| 454 this.set(remoting.ServerLogEntry.KEY_WEBAPP_VERSION_, | 454 this.set(remoting.ServerLogEntry.KEY_WEBAPP_VERSION_, |
| 455 chrome.app.getDetails().version); | 455 chrome.runtime.getManifest().version); |
| 456 }; | 456 }; |
| 457 | 457 |
| 458 /** | 458 /** |
| 459 * Adds a field specifying the mode to this log entry. | 459 * Adds a field specifying the mode to this log entry. |
| 460 * | 460 * |
| 461 * @param {remoting.ClientSession.Mode} mode | 461 * @param {remoting.ClientSession.Mode} mode |
| 462 */ | 462 */ |
| 463 remoting.ServerLogEntry.prototype.addModeField = function(mode) { | 463 remoting.ServerLogEntry.prototype.addModeField = function(mode) { |
| 464 this.set(remoting.ServerLogEntry.KEY_MODE_, | 464 this.set(remoting.ServerLogEntry.KEY_MODE_, |
| 465 remoting.ServerLogEntry.getModeField(mode)); | 465 remoting.ServerLogEntry.getModeField(mode)); |
| 466 }; | 466 }; |
| 467 | 467 |
| 468 /** | 468 /** |
| 469 * Gets the value of the mode field to be put in a log entry. | 469 * Gets the value of the mode field to be put in a log entry. |
| 470 * | 470 * |
| 471 * @private | 471 * @private |
| 472 * @param {remoting.ClientSession.Mode} mode | 472 * @param {remoting.ClientSession.Mode} mode |
| 473 * @return {string} | 473 * @return {string} |
| 474 */ | 474 */ |
| 475 remoting.ServerLogEntry.getModeField = function(mode) { | 475 remoting.ServerLogEntry.getModeField = function(mode) { |
| 476 switch(mode) { | 476 switch(mode) { |
| 477 case remoting.ClientSession.Mode.IT2ME: | 477 case remoting.ClientSession.Mode.IT2ME: |
| 478 return remoting.ServerLogEntry.VALUE_MODE_IT2ME_; | 478 return remoting.ServerLogEntry.VALUE_MODE_IT2ME_; |
| 479 case remoting.ClientSession.Mode.ME2ME: | 479 case remoting.ClientSession.Mode.ME2ME: |
| 480 return remoting.ServerLogEntry.VALUE_MODE_ME2ME_; | 480 return remoting.ServerLogEntry.VALUE_MODE_ME2ME_; |
| 481 default: | 481 default: |
| 482 return remoting.ServerLogEntry.VALUE_MODE_UNKNOWN_; | 482 return remoting.ServerLogEntry.VALUE_MODE_UNKNOWN_; |
| 483 } | 483 } |
| 484 }; | 484 }; |
| OLD | NEW |