Chromium Code Reviews| 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. |
| */ |