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

Unified Diff: remoting/webapp/crd/js/crd_event_handlers.js

Issue 868203002: Handle authentication failures in the v2 app by restarting the app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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 | « remoting/webapp/crd/js/background.js ('k') | remoting/webapp/crd/js/desktop_remoting.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/crd_event_handlers.js
diff --git a/remoting/webapp/crd/js/crd_event_handlers.js b/remoting/webapp/crd/js/crd_event_handlers.js
index 2f754397b1cba7c52fb122fa8accfcfbf1551f62..9196e6b3792fc4bae2e7d473d57ada92f35bf7f1 100644
--- a/remoting/webapp/crd/js/crd_event_handlers.js
+++ b/remoting/webapp/crd/js/crd_event_handlers.js
@@ -38,27 +38,6 @@ remoting.initElementEventHandlers = function() {
remoting.setMode(remoting.AppMode.CLIENT_CONNECTING);
remoting.app.getSessionConnector().reconnect();
};
- var doAuthRedirect = function() {
- if (!base.isAppsV2()) {
- remoting.oauth2.doAuthRedirect(function() {
- window.location.reload();
- });
- }
- };
- var fixAuthError = function() {
- if (base.isAppsV2()) {
- var onRefresh = function() {
- remoting.hostList.display();
- };
- var refreshHostList = function() {
- goHome();
- remoting.hostList.refresh(onRefresh);
- };
- remoting.identity.removeCachedAuthToken(refreshHostList);
- } else {
- doAuthRedirect();
- }
- };
/** @param {Event} event The event. */
var stopDaemon = function(event) {
remoting.hostSetupDialog.showForStop();
@@ -105,11 +84,11 @@ remoting.initElementEventHandlers = function() {
];
/** @type {Array.<{event: string, id: string, fn: function(Event):void}>} */
var auth_actions = [
- { event: 'click', id: 'auth-button', fn: doAuthRedirect },
{ event: 'click', id: 'cancel-connect-button', fn: goHome },
{ event: 'click', id: 'sign-out', fn:remoting.signOut },
{ event: 'click', id: 'token-refresh-error-ok', fn: goHome },
- { event: 'click', id: 'token-refresh-error-sign-in', fn: fixAuthError }
+ { event: 'click', id: 'token-refresh-error-sign-in',
+ fn: remoting.handleAuthFailureAndRelaunch }
];
registerEventListeners(it2me_actions);
registerEventListeners(me2me_actions);
« no previous file with comments | « remoting/webapp/crd/js/background.js ('k') | remoting/webapp/crd/js/desktop_remoting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698