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

Unified Diff: lib/csp.js

Issue 29371763: Issue 4795 - Use modern JavaScript syntax (Closed)
Patch Set: Addressed some more feedback Created Jan. 18, 2017, 11:44 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/compat.js ('k') | lib/devtools.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/csp.js
diff --git a/lib/csp.js b/lib/csp.js
index 5309863ab1bb65b9f8a5318d44ef723d0a6d49e9..6f43c352d9681613ef881fe3a187c2a17969a6ec 100644
--- a/lib/csp.js
+++ b/lib/csp.js
@@ -17,11 +17,11 @@
"use strict";
-let {defaultMatcher} = require("matcher");
-let {BlockingFilter, RegExpFilter} = require("filterClasses");
-let {getDecodedHostname} = require("url");
+const {defaultMatcher} = require("matcher");
+const {BlockingFilter, RegExpFilter} = require("filterClasses");
+const {getDecodedHostname} = require("url");
-chrome.webRequest.onHeadersReceived.addListener(function(details)
+chrome.webRequest.onHeadersReceived.addListener(details =>
{
let hostname = getDecodedHostname(new URL(details.url));
let match = defaultMatcher.matchesAny("", RegExpFilter.typeMap.WEBSOCKET,
« no previous file with comments | « lib/compat.js ('k') | lib/devtools.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld