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

Unified Diff: remoting/webapp/crd/js/oauth2_api.js

Issue 687873003: Allow the background page to get an OAuth token for apps v1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move jsonParseSafe into base namespace. Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/crd/js/oauth2.js ('k') | remoting/webapp/crd/js/remoting.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/oauth2_api.js
diff --git a/remoting/webapp/crd/js/oauth2_api.js b/remoting/webapp/crd/js/oauth2_api.js
index 8c49efece6e6066c97017dff2995a3c5833b49fe..56fa44f3e7d2a5dd0b1c2cea77f56a38818551fb 100644
--- a/remoting/webapp/crd/js/oauth2_api.js
+++ b/remoting/webapp/crd/js/oauth2_api.js
@@ -74,8 +74,8 @@ remoting.OAuth2Api.refreshAccessToken = function(
var onResponse = function(xhr) {
if (xhr.status == 200) {
try {
- // Don't use jsonParseSafe here unless you move the definition out of
- // remoting.js, otherwise this won't work from the OAuth trampoline.
+ // Don't use base.jsonParseSafe here unless you also include base.js,
+ // otherwise this won't work from the OAuth trampoline.
// TODO(jamiewalch): Fix this once we're no longer using the trampoline.
var tokens = JSON.parse(xhr.responseText);
onDone(tokens['access_token'], tokens['expires_in']);
@@ -122,8 +122,8 @@ remoting.OAuth2Api.exchangeCodeForTokens = function(
var onResponse = function(xhr) {
if (xhr.status == 200) {
try {
- // Don't use jsonParseSafe here unless you move the definition out of
- // remoting.js, otherwise this won't work from the OAuth trampoline.
+ // Don't use base.jsonParseSafe here unless you also include base.js,
+ // otherwise this won't work from the OAuth trampoline.
// TODO(jamiewalch): Fix this once we're no longer using the trampoline.
var tokens = JSON.parse(xhr.responseText);
onDone(tokens['refresh_token'],
« no previous file with comments | « remoting/webapp/crd/js/oauth2.js ('k') | remoting/webapp/crd/js/remoting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698