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

Side by Side Diff: remoting/client/extension/client.js

Issue 3252006: Updated chromoting directory URL to use www.googleapis.com, switched to https.. (Closed)
Patch Set: Created 10 years, 3 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
« no previous file with comments | « chrome/service/remoting/remoting_directory_service.cc ('k') | remoting/tools/hostdir.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 function initParams() { 5 function initParams() {
6 var hash; 6 var hash;
7 var hashes = window.location.href.slice( 7 var hashes = window.location.href.slice(
8 window.location.href.indexOf('?') + 1).split('&'); 8 window.location.href.indexOf('?') + 1).split('&');
9 9
10 // Prepopulate via cookies first. 10 // Prepopulate via cookies first.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 parsed_response = JSON.parse(xhr.responseText); 123 parsed_response = JSON.parse(xhr.responseText);
124 hostlist_div.appendChild(document.createTextNode('--Found Hosts--')); 124 hostlist_div.appendChild(document.createTextNode('--Found Hosts--'));
125 hostlist_div.appendChild(document.createElement('br')); 125 hostlist_div.appendChild(document.createElement('br'));
126 appendHostLinks(parsed_response.data.items); 126 appendHostLinks(parsed_response.data.items);
127 } else { 127 } else {
128 console.log('bad status on host list query: "' + xhr.status + ' ' + xhr.st atusText); 128 console.log('bad status on host list query: "' + xhr.status + ' ' + xhr.st atusText);
129 hostlist_div.appendChild(document.createTextNode('!! Failed !!. :\'(')); 129 hostlist_div.appendChild(document.createTextNode('!! Failed !!. :\'('));
130 } 130 }
131 }; 131 };
132 132
133 xhr.open('GET', 'http://www-googleapis-test.sandbox.google.com/chromoting/v1/@ me/hosts'); 133 xhr.open('GET', 'https://www.googleapis.com/chromoting/v1/@me/hosts');
134 xhr.setRequestHeader('Content-Type', 'text/plain;charset=UTF-8'); 134 xhr.setRequestHeader('Content-Type', 'text/plain;charset=UTF-8');
135 xhr.setRequestHeader('Authorization', 'GoogleLogin auth=' + token); 135 xhr.setRequestHeader('Authorization', 'GoogleLogin auth=' + token);
136 xhr.send(null); 136 xhr.send(null);
137 } 137 }
138 138
139 function appendHostLinks(hostlist) { 139 function appendHostLinks(hostlist) {
140 // A host link entry should look like: 140 // A host link entry should look like:
141 // - Host: <a onclick="openChromotingTab(host_jid); return false;">NAME (JID)</a > <br /> 141 // - Host: <a onclick="openChromotingTab(host_jid); return false;">NAME (JID)</a > <br />
142 var host; 142 var host;
143 var host_link; 143 var host_link;
(...skipping 28 matching lines...) Expand all
172 background.openChromotingTab(host_jid); 172 background.openChromotingTab(host_jid);
173 } 173 }
174 174
175 function setAuthCookies(form) { 175 function setAuthCookies(form) {
176 var now = new Date(); 176 var now = new Date();
177 now.setTime(now.getTime() + 1000 * 60 * 60 * 24 * 365) 177 now.setTime(now.getTime() + 1000 * 60 * 60 * 24 * 365)
178 178
179 setCookie('xmpp_auth', form.xmpp_auth.value, 100); 179 setCookie('xmpp_auth', form.xmpp_auth.value, 100);
180 setCookie('chromoting_auth', form.chromoting_auth.value, 100); 180 setCookie('chromoting_auth', form.chromoting_auth.value, 100);
181 } 181 }
OLDNEW
« no previous file with comments | « chrome/service/remoting/remoting_directory_service.cc ('k') | remoting/tools/hostdir.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698