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

Unified Diff: remoting/webapp/me2mom/remoting.js

Issue 7108007: Add basic debug log to host page. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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
Index: remoting/webapp/me2mom/remoting.js
===================================================================
--- remoting/webapp/me2mom/remoting.js (revision 88003)
+++ remoting/webapp/me2mom/remoting.js (working copy)
@@ -157,20 +157,25 @@
function setHostMode(mode) {
var section = document.getElementById('host-section');
var modes = section.getElementsByClassName('mode');
+ addToDebugLog('Host mode: ' + mode);
setMode_(mode, modes);
}
function setClientMode(mode) {
var section = document.getElementById('client-section');
var modes = section.getElementsByClassName('mode');
+ addToDebugLog('Client mode: ' + mode);
setMode_(mode, modes);
}
function tryShare() {
+ addToDebugLog("Attempting to share...");
if (remoting.oauth2.needsNewAccessToken()) {
+ addToDebugLog("Refreshing token...");
remoting.oauth2.refreshAccessToken(function() {
if (remoting.oauth2.needsNewAccessToken()) {
// If we still need it, we're going to infinite loop.
+ addToDebugLog("Unable to get access token");
throw "Unable to get access token";
}
tryShare();
@@ -205,16 +210,19 @@
setHostMode('unshared');
plugin.parentNode.removeChild(plugin);
} else {
+ addToDebugLog('Unknown state -> ' + state);
window.alert('Unknown state -> ' + state);
Jamie 2011/06/07 18:58:32 It seems redundant to do both of these.
garykac 2011/06/07 20:44:32 Done.
}
}
function cancelShare() {
+ addToDebugLog('Canceling share');
Jamie 2011/06/07 18:58:32 pico-nit: Add an elipsis to this (and the next) lo
garykac 2011/06/07 20:44:32 Done.
var plugin = document.getElementById(remoting.HOST_PLUGIN_ID);
plugin.disconnect();
}
function startSession_() {
+ addToDebugLog('Starting session');
remoting.username = remoting.getItem(remoting.XMPP_LOGIN_NAME);
document.location = 'remoting_session.html';
}

Powered by Google App Engine
This is Rietveld 408576698