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

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

Issue 12250011: Get extension version synchrously from the manifest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« remoting/webapp/remoting.js ('K') | « remoting/webapp/remoting.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 9
10 'use strict'; 10 'use strict';
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 };
OLDNEW
« remoting/webapp/remoting.js ('K') | « remoting/webapp/remoting.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698