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

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

Issue 7263008: Fixup error message shown when Chromoting is not enabled properly. (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
« 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/me2mom/remoting_session.js
===================================================================
--- remoting/webapp/me2mom/remoting_session.js (revision 90608)
+++ remoting/webapp/me2mom/remoting_session.js (working copy)
@@ -134,6 +134,12 @@
plugin.desktopSizeUpdate = desktopSizeChanged;
plugin.loginChallenge = loginChallengeCallback;
+ if (typeof plugin.connect !== 'function') {
+ setClientStateMessage("Unable to load plugin. Please make sure that " +
+ "'Remoting' and 'P2P API' are enabled in chrome://flags.");
+ return;
+ }
+
if (!checkVersion(plugin)) {
// TODO(garykac): We need better messaging here. Perhaps an install link.
setClientStateMessage("Out of date. Please re-install.");
@@ -141,15 +147,7 @@
}
addToDebugLog('Connect as user ' + remoting.username);
-
- // TODO(garykac): Clean exit if |connect| isn't a function.
- if (typeof plugin.connect === 'function') {
- registerConnection();
- } else {
- addToDebugLog('ERROR: remoting plugin not loaded');
- setClientStateMessage('Plugin not loaded');
- }
-
+ registerConnection();
}
function toggleScaleToFit() {
« 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