summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorsimonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-05 20:56:16 +0000
committersimonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-05 20:56:16 +0000
commitddfdeca83254db8e3e5c0b2b6c84bd7f73d581d1 (patch)
treec67236fbe1aa1109a27ab4c726cb21f65714e049 /remoting
parent243b4cf1aab5bba17973ac48fad31d5742e7a916 (diff)
downloadchromium_src-ddfdeca83254db8e3e5c0b2b6c84bd7f73d581d1.zip
chromium_src-ddfdeca83254db8e3e5c0b2b6c84bd7f73d581d1.tar.gz
chromium_src-ddfdeca83254db8e3e5c0b2b6c84bd7f73d581d1.tar.bz2
[Chromoting] Use headers, not parameters, to carry the OAuth token when getting a list of hosts.
This reverts http://crrev.com/124730. The webkit bug that necessitated that workaround was fixed at http://trac.webkit.org/changeset/110608. BUG=116574 Review URL: https://chromiumcodereview.appspot.com/10532013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140607 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/webapp/host_list.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/remoting/webapp/host_list.js b/remoting/webapp/host_list.js
index 0061068..dd5a546 100644
--- a/remoting/webapp/host_list.js
+++ b/remoting/webapp/host_list.js
@@ -91,12 +91,10 @@ remoting.HostList.prototype.refresh = function(onDone) {
/** @param {string?} token The OAuth2 token. */
var getHosts = function(token) {
if (token) {
- // TODO(simonmorris): Pass the access token in a header, not a URL
- // parameter, when crbug.com/116574 has a better fix.
- var params = { 'access_token': token };
+ var headers = { 'Authorization': 'OAuth ' + token };
remoting.xhr.get(
'https://www.googleapis.com/chromoting/v1/@me/hosts',
- parseHostListResponse, params);
+ parseHostListResponse, '', headers);
} else {
that.lastError_ = remoting.Error.AUTHENTICATION_FAILED;
onDone(false);