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

Side by Side Diff: remoting/webapp/crd/js/host_table_entry.js

Issue 910403002: Suspend (rather than shut down) the host upon policy errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mistyped-policies
Patch Set: Rebasing... Created 5 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 unified diff | Download patch
« no previous file with comments | « remoting/resources/remoting_strings.grd ('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 * Class representing an entry in the host-list portion of the home screen. 7 * Class representing an entry in the host-list portion of the home screen.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 /** 337 /**
338 * Formats host's host-offline-reason value (i.e. 'INVALID_HOST_CONFIGURATION') 338 * Formats host's host-offline-reason value (i.e. 'INVALID_HOST_CONFIGURATION')
339 * to a human-readable description of the error. 339 * to a human-readable description of the error.
340 * @param {string} hostOfflineReason 340 * @param {string} hostOfflineReason
341 * @return {string} 341 * @return {string}
342 */ 342 */
343 function formatHostOfflineReason(hostOfflineReason) { 343 function formatHostOfflineReason(hostOfflineReason) {
344 var knownReasonTags = [ 344 var knownReasonTags = [
345 /*i18n-content*/ 'OFFLINE_REASON_INITIALIZATION_FAILED', 345 /*i18n-content*/ 'OFFLINE_REASON_INITIALIZATION_FAILED',
346 /*i18n-content*/ 'OFFLINE_REASON_INVALID_HOST_CONFIGURATION', 346 /*i18n-content*/ 'OFFLINE_REASON_INVALID_HOST_CONFIGURATION',
347 /*i18n-content*/ 'OFFLINE_REASON_INVALID_HOST_DOMAIN',
347 /*i18n-content*/ 'OFFLINE_REASON_INVALID_HOST_ID', 348 /*i18n-content*/ 'OFFLINE_REASON_INVALID_HOST_ID',
348 /*i18n-content*/ 'OFFLINE_REASON_INVALID_OAUTH_CREDENTIALS', 349 /*i18n-content*/ 'OFFLINE_REASON_INVALID_OAUTH_CREDENTIALS',
349 /*i18n-content*/ 'OFFLINE_REASON_INVALID_HOST_DOMAIN',
350 /*i18n-content*/ 'OFFLINE_REASON_LOGIN_SCREEN_NOT_SUPPORTED', 350 /*i18n-content*/ 'OFFLINE_REASON_LOGIN_SCREEN_NOT_SUPPORTED',
351 /*i18n-content*/ 'OFFLINE_REASON_POLICY_CHANGE_REQUIRES_RESTART',
352 /*i18n-content*/ 'OFFLINE_REASON_POLICY_READ_ERROR',
353 /*i18n-content*/ 'OFFLINE_REASON_SUCCESS_EXIT',
351 /*i18n-content*/ 'OFFLINE_REASON_USERNAME_MISMATCH' 354 /*i18n-content*/ 'OFFLINE_REASON_USERNAME_MISMATCH'
352 ]; 355 ];
353 var offlineReasonTag = 'OFFLINE_REASON_' + hostOfflineReason; 356 var offlineReasonTag = 'OFFLINE_REASON_' + hostOfflineReason;
354 if (knownReasonTags.indexOf(offlineReasonTag) != (-1)) { 357 if (knownReasonTags.indexOf(offlineReasonTag) != (-1)) {
355 return chrome.i18n.getMessage(offlineReasonTag); 358 return chrome.i18n.getMessage(offlineReasonTag);
356 } else { 359 } else {
357 return chrome.i18n.getMessage( 360 return chrome.i18n.getMessage(
358 /*i18n-content*/ 'OFFLINE_REASON_UNKNOWN', 361 /*i18n-content*/ 'OFFLINE_REASON_UNKNOWN',
359 hostOfflineReason); 362 hostOfflineReason);
360 } 363 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 var element = document.activeElement; 449 var element = document.activeElement;
447 while (element) { 450 while (element) {
448 if (element == this.tableRow) { 451 if (element == this.tableRow) {
449 this.tableRow.classList.add('child-focused'); 452 this.tableRow.classList.add('child-focused');
450 return; 453 return;
451 } 454 }
452 element = element.parentNode; 455 element = element.parentNode;
453 } 456 }
454 this.tableRow.classList.remove('child-focused'); 457 this.tableRow.classList.remove('child-focused');
455 }; 458 };
OLDNEW
« no previous file with comments | « remoting/resources/remoting_strings.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698