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

Unified Diff: remoting/webapp/remoting.js

Issue 9564029: [Chromoting] Log extension name and version number on startup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/remoting.js
diff --git a/remoting/webapp/remoting.js b/remoting/webapp/remoting.js
index b536190526c9275f68a927341ec463e6ca1d3be3..9723c7af5d4fbd87e518848b83617f7b79646cfb 100644
--- a/remoting/webapp/remoting.js
+++ b/remoting/webapp/remoting.js
@@ -73,6 +73,26 @@ remoting.init = function() {
var button = document.getElementById('share-button');
button.disabled = true;
}
+
+ remoting.logExtensionInfoAsync_();
Jamie 2012/03/01 22:35:41 I think this would be better at the start of the f
garykac 2012/03/02 00:40:53 Done.
+};
+
+/**
+ * Log information about the current extension.
+ * The extension manifest is loaded and parsed to extract this info.
+ */
+remoting.logExtensionInfoAsync_ = function() {
+ /** @type {XMLHttpRequest} */
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', 'manifest.json');
+ xhr.onload = function(e) {
+ var manifest =
+ /** @type {{name: string, version: string, default_locale: string}} */
+ JSON.parse(xhr.responseText);
+ console.log(manifest.name + ' version: ' + manifest.version +
+ ' (' + manifest.default_locale + ')');
Jamie 2012/03/01 22:35:41 I don't think I'd bother with the default_locale.
garykac 2012/03/02 00:40:53 Done.
+ }
+ xhr.send(null);
};
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698