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

Side by Side Diff: remoting/webapp/me2mom/oauth2_callback.html

Issue 7574019: Removed oauth2_callback.html, merged functionality into remoting.js and improved 'No thanks' UX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clear oauth2 results on init. Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!doctype html>
2 <!--
3 Copyright (c) 2011 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file.
6 -->
7
8 <html>
9 <head>
10 <script src="oauth2.js"></script>
11 <script src="xhr.js"></script>
12 </head>
13 <body>
14 <div id="error" style="display:none;">
15 Something went wrong getting OAuth2 token.
16 </div>
17 <script>
18 function retrieveRefreshToken(query) {
19 var parts = query.split('&');
20 var queryArgs = {};
21 for (var i = 0; i < parts.length; i++) {
22 var pair = parts[i].split('=');
23 queryArgs[pair[0]] = pair[1];
24 }
25 if ('code' in queryArgs) {
26 var oauth2 = new remoting.OAuth2();
27 oauth2.exchangeCodeForToken(queryArgs['code'], function() {
28 window.location.replace(chrome.extension.getURL('choice.html'));
29 });
30 } else {
31 document.getElementById('error').style.display = 'block';
32 }
33 }
34
35 retrieveRefreshToken(window.location.search.substring(1));
36 </script>
37 </body>
38 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698