Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/whitelisting.js

Issue 29371763: Issue 4795 - Use modern JavaScript syntax (Closed)
Patch Set: Use const as per the new rules Created Jan. 18, 2017, 7:23 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/utils.js ('k') | notification.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/whitelisting.js
diff --git a/lib/whitelisting.js b/lib/whitelisting.js
index 3283952bf860f7db1d853941ef76643db4a8862c..da2f187d797906149caf29831a0187942a74525e 100644
--- a/lib/whitelisting.js
+++ b/lib/whitelisting.js
@@ -19,14 +19,15 @@
"use strict";
-let {defaultMatcher} = require("matcher");
-let {RegExpFilter} = require("filterClasses");
-let {DownloadableSubscription} = require("subscriptionClasses");
-let {FilterNotifier} = require("filterNotifier");
-let {stringifyURL, getDecodedHostname, extractHostFromFrame, isThirdParty} = require("url");
-let {port} = require("messaging");
-let devtools = require("devtools");
-let {verifySignature} = require("rsa");
+const {defaultMatcher} = require("matcher");
+const {RegExpFilter} = require("filterClasses");
+const {DownloadableSubscription} = require("subscriptionClasses");
+const {FilterNotifier} = require("filterNotifier");
+const {stringifyURL, getDecodedHostname,
+ extractHostFromFrame, isThirdParty} = require("url");
+const {port} = require("messaging");
+const devtools = require("devtools");
+const {verifySignature} = require("rsa");
let sitekeys = new ext.PageMap();
@@ -60,7 +61,7 @@ let checkWhitelisted =
* @param {number} [typeMask=RegExpFilter.typeMap.DOCUMENT]
* @return {?WhitelistFilter}
*/
-exports.checkWhitelisted = function(page, frame, typeMask)
+exports.checkWhitelisted = (page, frame, typeMask) =>
{
if (typeof typeMask == "undefined")
typeMask = RegExpFilter.typeMap.DOCUMENT;
@@ -118,7 +119,7 @@ let getKey =
* @param {Frame} frame
* @return {string}
*/
-exports.getKey = function(page, frame)
+exports.getKey = (page, frame) =>
{
let keys = sitekeys.get(page);
if (!keys)
« no previous file with comments | « lib/utils.js ('k') | notification.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld