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

Side by Side Diff: remoting/webapp/base/js/error.js

Issue 2867223003: Send a message to the client if bad It2Me policies are read. (Closed)
Patch Set: Fix race. Created 3 years, 7 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') | remoting/webapp/crd/js/host_screen.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 'use strict'; 5 'use strict';
6 6
7 /** @suppress {duplicate} */ 7 /** @suppress {duplicate} */
8 var remoting = remoting || {}; 8 var remoting = remoting || {};
9 9
10 /** 10 /**
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 SERVICE_UNAVAILABLE: /*i18n-content*/ 'ERROR_SERVICE_UNAVAILABLE', 186 SERVICE_UNAVAILABLE: /*i18n-content*/ 'ERROR_SERVICE_UNAVAILABLE',
187 NOT_AUTHENTICATED: /*i18n-content*/ 'ERROR_NOT_AUTHENTICATED', 187 NOT_AUTHENTICATED: /*i18n-content*/ 'ERROR_NOT_AUTHENTICATED',
188 NOT_FOUND: /*i18n-content*/ 'ERROR_NOT_FOUND', 188 NOT_FOUND: /*i18n-content*/ 'ERROR_NOT_FOUND',
189 INVALID_HOST_DOMAIN: /*i18n-content*/ 'ERROR_INVALID_HOST_DOMAIN', 189 INVALID_HOST_DOMAIN: /*i18n-content*/ 'ERROR_INVALID_HOST_DOMAIN',
190 P2P_FAILURE: /*i18n-content*/ 'ERROR_P2P_FAILURE', 190 P2P_FAILURE: /*i18n-content*/ 'ERROR_P2P_FAILURE',
191 REGISTRATION_FAILED: /*i18n-content*/ 'ERROR_HOST_REGISTRATION_FAILED', 191 REGISTRATION_FAILED: /*i18n-content*/ 'ERROR_HOST_REGISTRATION_FAILED',
192 NOT_AUTHORIZED: /*i18n-content*/ 'ERROR_NOT_AUTHORIZED', 192 NOT_AUTHORIZED: /*i18n-content*/ 'ERROR_NOT_AUTHORIZED',
193 // TODO(garykac): Move app-specific errors into separate location. 193 // TODO(garykac): Move app-specific errors into separate location.
194 APP_NOT_AUTHORIZED: /*i18n-content*/ 'ERROR_APP_NOT_AUTHORIZED', 194 APP_NOT_AUTHORIZED: /*i18n-content*/ 'ERROR_APP_NOT_AUTHORIZED',
195 NACL_DISABLED: /*i18n-content*/ 'ERROR_NACL_DISABLED', 195 NACL_DISABLED: /*i18n-content*/ 'ERROR_NACL_DISABLED',
196 POLICY_ERROR: /*i18n-content*/ 'ERROR_POLICY',
196 }; 197 };
197 198
198 // A whole bunch of semi-redundant constants, mostly to reduce to size 199 // A whole bunch of semi-redundant constants, mostly to reduce to size
199 // of the diff that introduced the remoting.Error class. 200 // of the diff that introduced the remoting.Error class.
200 // 201 //
201 // Please don't add any more constants here; just call the 202 // Please don't add any more constants here; just call the
202 // remoting.Error constructor directly 203 // remoting.Error constructor directly
203 204
204 /** 205 /**
205 * @param {number} httpStatus An HTTP status code. 206 * @param {number} httpStatus An HTTP status code.
(...skipping 29 matching lines...) Expand all
235 remoting.Error.handler = function(onError) { 236 remoting.Error.handler = function(onError) {
236 return function(/** * */ error) { 237 return function(/** * */ error) {
237 if (error instanceof remoting.Error) { 238 if (error instanceof remoting.Error) {
238 onError(/** @type {!remoting.Error} */ (error)); 239 onError(/** @type {!remoting.Error} */ (error));
239 } else { 240 } else {
240 console.error('Unexpected error:', error); 241 console.error('Unexpected error:', error);
241 onError(remoting.Error.unexpected()); 242 onError(remoting.Error.unexpected());
242 } 243 }
243 }; 244 };
244 }; 245 };
OLDNEW
« no previous file with comments | « remoting/resources/remoting_strings.grd ('k') | remoting/webapp/crd/js/host_screen.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698