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

Unified Diff: remoting/webapp/crd/js/remoting.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: 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
Index: remoting/webapp/crd/js/remoting.js
diff --git a/remoting/webapp/crd/js/remoting.js b/remoting/webapp/crd/js/remoting.js
index 037921ce4b7bb396045c7f3bee82ac56a584c85f..50ff475e495cc337a4e1365a6a2951c07c050c12 100644
--- a/remoting/webapp/crd/js/remoting.js
+++ b/remoting/webapp/crd/js/remoting.js
@@ -424,18 +424,6 @@ function getUrlParameters_() {
}
/**
- * @param {string} jsonString A JSON-encoded string.
- * @return {*} The decoded object, or undefined if the string cannot be parsed.
- */
-function jsonParseSafe(jsonString) {
- try {
- return JSON.parse(jsonString);
- } catch (err) {
- return undefined;
- }
-}
-
-/**
* Return the current time as a formatted string suitable for logging.
*
* @return {string} The current time, formatted as [mmdd/hhmmss.xyz]
@@ -528,17 +516,6 @@ function migrateLocalToChromeStorage_() {
}
/**
- * Generate a nonce, to be used as an xsrf protection token.
- *
- * @return {string} A URL-Safe Base64-encoded 128-bit random value. */
-remoting.generateXsrfToken = function() {
- var random = new Uint8Array(16);
- window.crypto.getRandomValues(random);
- var base64Token = window.btoa(String.fromCharCode.apply(null, random));
- return base64Token.replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '');
-};
-
-/**
* Tests whether we are running on Mac.
*
* @return {boolean} True if the platform is Mac.

Powered by Google App Engine
This is Rietveld 408576698