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

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

Issue 9148043: Rename webapp_it2me to remoting_webapp and move it from webapp/me2mom to webapp/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add webapp_it2me back Created 8 years, 11 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
« no previous file with comments | « remoting/webapp/me2mom/oauth2.js ('k') | remoting/webapp/me2mom/plugin_settings.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <script>
15 function retrieveRefreshToken(query) {
16 var parts = query.split('&');
17 var queryArgs = {};
18 for (var i = 0; i < parts.length; i++) {
19 var pair = parts[i].split('=');
20 queryArgs[pair[0]] = pair[1];
21 }
22 if ('code' in queryArgs) {
23 var oauth2 = new remoting.OAuth2();
24 oauth2.exchangeCodeForToken(queryArgs['code'], function() {
25 window.location.replace(chrome.extension.getURL('choice.html'));
26 });
27 } else {
28 window.location.replace(chrome.extension.getURL('choice.html'));
29 }
30 }
31
32 retrieveRefreshToken(window.location.search.substring(1));
33 </script>
34 </body>
35 </html>
OLDNEW
« no previous file with comments | « remoting/webapp/me2mom/oauth2.js ('k') | remoting/webapp/me2mom/plugin_settings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698