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

Unified Diff: chrome/browser/resources/gaia_auth/channel.js

Issue 1179433002: signin: Abort previous 'channelConnected' handling on retry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix wrong member var decl Created 5 years, 6 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
Index: chrome/browser/resources/gaia_auth/channel.js
diff --git a/chrome/browser/resources/gaia_auth/channel.js b/chrome/browser/resources/gaia_auth/channel.js
index 52094b9d925f62c141036f2ac53c37b04cdba371..ba8ec4dddbd83aa6c841e5824b405f4de44f2a8d 100644
--- a/chrome/browser/resources/gaia_auth/channel.js
+++ b/chrome/browser/resources/gaia_auth/channel.js
@@ -6,6 +6,17 @@
* Channel to the background script.
*/
function Channel() {
+ // Message port to use to communicate with background script.
+ this.port_ = null;
+
+ // Registered message callbacks.
+ this.messageCallbacks_ = {};
+
+ // Internal request id to track pending requests.
+ this.nextInternalRequestId_ = 0;
dzhioev (left Google) 2015/06/10 20:04:19 This initialized with primitive type, so you can l
xiyuan 2015/06/10 20:21:12 Yes, we can leave it where it was. But do you thin
+
+ // Pending internal request callbacks.
+ this.internalRequestCallbacks_ = {};
}
/** @const */
@@ -15,18 +26,6 @@ Channel.INTERNAL_REQUEST_MESSAGE = 'internal-request-message';
Channel.INTERNAL_REPLY_MESSAGE = 'internal-reply-message';
Channel.prototype = {
- // Message port to use to communicate with background script.
- port_: null,
-
- // Registered message callbacks.
- messageCallbacks_: {},
-
- // Internal request id to track pending requests.
- nextInternalRequestId_: 0,
-
- // Pending internal request callbacks.
- internalRequestCallbacks_: {},
dzhioev (left Google) 2015/06/10 20:04:19 Same here
-
/**
* Initialize the channel with given port for the background script.
*/

Powered by Google App Engine
This is Rietveld 408576698