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

Unified Diff: remoting/webapp/crd/js/session_connector_impl.js

Issue 945033002: Updated XHR API so call sites are more descriptive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@xhr-test
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: remoting/webapp/crd/js/session_connector_impl.js
diff --git a/remoting/webapp/crd/js/session_connector_impl.js b/remoting/webapp/crd/js/session_connector_impl.js
index fecad39c3ef14fd11421bc78d165f8ca0596e8fb..d8225120d0e7a6d4fee66c6b7689fa18aff4431f 100644
--- a/remoting/webapp/crd/js/session_connector_impl.js
+++ b/remoting/webapp/crd/js/session_connector_impl.js
@@ -468,12 +468,13 @@ remoting.SessionConnectorImpl.prototype.onSignalingState_ = function(state) {
remoting.SessionConnectorImpl.prototype.connectIT2MeWithToken_ =
function(token) {
// Resolve the host id to get the host JID.
- this.pendingXhr_ = remoting.xhr.get(
- remoting.settings.DIRECTORY_API_BASE_URL + '/support-hosts/' +
- encodeURIComponent(this.hostId_),
- this.onIT2MeHostInfo_.bind(this),
- '',
- { 'Authorization': 'OAuth ' + token });
+ this.pendingXhr_ = remoting.xhr.start({
+ method: 'GET',
+ url: remoting.settings.DIRECTORY_API_BASE_URL + '/support-hosts/' +
+ encodeURIComponent(this.hostId_),
+ onDone: this.onIT2MeHostInfo_.bind(this),
+ oauthToken: token
+ });
};
/**

Powered by Google App Engine
This is Rietveld 408576698