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

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

Issue 803653004: Update Chromoting to use /third_party/closure_compiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused types 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 that routes gnubby-auth extension messages to and from the gnubbyd 7 * Class that routes gnubby-auth extension messages to and from the gnubbyd
8 * extension. 8 * extension.
9 */ 9 */
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 * @private 46 * @private
47 */ 47 */
48 remoting.GnubbyAuthHandler.prototype.callback_ = 48 remoting.GnubbyAuthHandler.prototype.callback_ =
49 function(connectionId, response) { 49 function(connectionId, response) {
50 try { 50 try {
51 this.clientSession_.sendGnubbyAuthMessage({ 51 this.clientSession_.sendGnubbyAuthMessage({
52 'type': 'data', 52 'type': 'data',
53 'connectionId': connectionId, 53 'connectionId': connectionId,
54 'data': getArrayAttr(response, 'data') 54 'data': getArrayAttr(response, 'data')
55 }); 55 });
56 } catch (err) { 56 } catch (/** @type {*} */ err) {
57 console.error('gnubby callback failed: ', /** @type {*} */ (err)); 57 console.error('gnubby callback failed: ', err);
58 this.clientSession_.sendGnubbyAuthMessage({ 58 this.clientSession_.sendGnubbyAuthMessage({
59 'type': 'error', 59 'type': 'error',
60 'connectionId': connectionId 60 'connectionId': connectionId
61 }); 61 });
62 return; 62 return;
63 } 63 }
64 }; 64 };
65 65
66 /** 66 /**
67 * Send data to the gnubbyd extension. 67 * Send data to the gnubbyd extension.
(...skipping 23 matching lines...) Expand all
91 */ 91 */
92 function onGnubbydDevReply_(jsonObject, callback, reply) { 92 function onGnubbydDevReply_(jsonObject, callback, reply) {
93 var kGnubbydStableExtensionId = 'beknehfpfkghjoafdifaflglpjkojoco'; 93 var kGnubbydStableExtensionId = 'beknehfpfkghjoafdifaflglpjkojoco';
94 94
95 if (reply) { 95 if (reply) {
96 callback(reply); 96 callback(reply);
97 } else { 97 } else {
98 chrome.runtime.sendMessage(kGnubbydStableExtensionId, jsonObject, callback); 98 chrome.runtime.sendMessage(kGnubbydStableExtensionId, jsonObject, callback);
99 } 99 }
100 } 100 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698