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

Side by Side Diff: remoting/webapp/me2mom/background.js

Issue 7046012: Basic OAuth2 support using the native app flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: last one Created 9 years, 7 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/background.html ('k') | remoting/webapp/me2mom/choice.html » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 var remoting = {}; 5 var remoting = {};
6 6
7 function setItem(key, value) { 7 function setItem(key, value) {
8 window.localStorage.setItem(key, value); 8 window.localStorage.setItem(key, value);
9 } 9 }
10 10
11 function getItem(key, defaultValue) { 11 function getItem(key, defaultValue) {
12 var result = window.localStorage.getItem(key); 12 var result = window.localStorage.getItem(key);
13 return (result != null) ? result : defaultValue; 13 return (result != null) ? result : defaultValue;
14 } 14 }
15 15
16 function removeItem(key) { 16 function removeItem(key) {
17 window.localStorage.removeItem(key); 17 window.localStorage.removeItem(key);
18 } 18 }
19 19
20 function clearAll() { 20 function clearAll() {
21 window.localStorage.clear(); 21 window.localStorage.clear();
22 } 22 }
23
24 var oauth = ChromeExOAuth.initBackgroundPage({
25 'request_url': 'https://www.google.com/accounts/OAuthGetRequestToken',
26 'authorize_url': 'https://www.google.com/accounts/OAuthAuthorizeToken',
27 'access_url': 'https://www.google.com/accounts/OAuthGetAccessToken',
28 'consumer_key': 'anonymous',
29 'consumer_secret': 'anonymous',
30 'scope': 'https://www.googleapis.com/auth/chromoting',
31 'app_name': 'Remoting WebApp'
32 });
OLDNEW
« no previous file with comments | « remoting/webapp/me2mom/background.html ('k') | remoting/webapp/me2mom/choice.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698