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

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

Issue 11316231: Improve curtain mode error message. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer comments. Created 8 years 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
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('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 * Functions related to the 'client screen' for Chromoting. 7 * Functions related to the 'client screen' for Chromoting.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 if (oldState == remoting.ClientSession.State.CONNECTED) { 248 if (oldState == remoting.ClientSession.State.CONNECTED) {
249 remoting.clientSession.removePlugin(); 249 remoting.clientSession.removePlugin();
250 remoting.clientSession = null; 250 remoting.clientSession = null;
251 console.log('Connection closed by host'); 251 console.log('Connection closed by host');
252 if (remoting.currentConnectionType == remoting.ConnectionType.It2Me) { 252 if (remoting.currentConnectionType == remoting.ConnectionType.It2Me) {
253 remoting.setMode(remoting.AppMode.CLIENT_SESSION_FINISHED_IT2ME); 253 remoting.setMode(remoting.AppMode.CLIENT_SESSION_FINISHED_IT2ME);
254 } else { 254 } else {
255 remoting.setMode(remoting.AppMode.CLIENT_SESSION_FINISHED_ME2ME); 255 remoting.setMode(remoting.AppMode.CLIENT_SESSION_FINISHED_ME2ME);
256 } 256 }
257 } else { 257 } else {
258 // The transition from CONNECTING to CLOSED state may happen 258 // A state transition from CONNECTING -> CLOSED can happen if the host
259 // only with older client plugins. Current version should go the 259 // closes the connection without an error message instead of accepting it.
260 // FAILED state when connection fails. 260 // For example, it does this if it fails to activate curtain mode. Since
261 showConnectError_(remoting.Error.INVALID_ACCESS_CODE); 261 // there's no way of knowing exactly what went wrong, we rely on server-
262 // side logs in this case and show a generic error message.
263 showConnectError_(remoting.Error.UNEXPECTED);
262 } 264 }
263 265
264 } else if (newState == remoting.ClientSession.State.FAILED) { 266 } else if (newState == remoting.ClientSession.State.FAILED) {
265 console.error('Client plugin reported connection failed: ' + 267 console.error('Client plugin reported connection failed: ' +
266 remoting.clientSession.error); 268 remoting.clientSession.error);
267 clearPin = true; 269 clearPin = true;
268 if (remoting.clientSession.error == 270 if (remoting.clientSession.error ==
269 remoting.ClientSession.ConnectionError.HOST_IS_OFFLINE) { 271 remoting.ClientSession.ConnectionError.HOST_IS_OFFLINE) {
270 clearPin = false; 272 clearPin = false;
271 retryConnectOrReportOffline_(); 273 retryConnectOrReportOffline_();
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 remoting.ClientSession.Mode.ME2ME, onClientStateChange_); 551 remoting.ClientSession.Mode.ME2ME, onClientStateChange_);
550 // Don't log errors for cached JIDs. 552 // Don't log errors for cached JIDs.
551 remoting.clientSession.logErrors(!remoting.retryIfOffline); 553 remoting.clientSession.logErrors(!remoting.retryIfOffline);
552 remoting.clientSession.createPluginAndConnect( 554 remoting.clientSession.createPluginAndConnect(
553 document.getElementById('session-mode'), 555 document.getElementById('session-mode'),
554 token); 556 token);
555 } else { 557 } else {
556 showConnectError_(remoting.Error.AUTHENTICATION_FAILED); 558 showConnectError_(remoting.Error.AUTHENTICATION_FAILED);
557 } 559 }
558 } 560 }
OLDNEW
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698