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

Unified Diff: lib/whitelisting.js

Issue 6445129351036928: Noissue - Fixed issue where JsDoc documented module functions incorrectly (Closed)
Patch Set: Created April 15, 2015, 3:52 p.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/url.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/whitelisting.js
===================================================================
--- a/lib/whitelisting.js
+++ b/lib/whitelisting.js
@@ -28,7 +28,7 @@
* @param {Page} page
* @return {WhitelistFilter} The active filter whitelisting this page or null
*/
-function isPageWhitelisted(page)
+exports.isPageWhitelisted = function(page)
{
let url = page.url;
@@ -36,8 +36,7 @@
stringifyURL(url), "DOCUMENT",
getDecodedHostname(url), false, null
);
-}
-exports.isPageWhitelisted = isPageWhitelisted;
+};
/**
* Checks whether a frame is whitelisted.
@@ -48,7 +47,7 @@
* the frame is whitelisted for.
* @return {Boolean}
*/
-function isFrameWhitelisted(page, frame, type)
+exports.isFrameWhitelisted = function(page, frame, type)
{
while (frame)
{
@@ -69,8 +68,7 @@
}
return false;
-}
-exports.isFrameWhitelisted = isFrameWhitelisted;
+};
/**
* Gets the public key, previously recorded for the given page
@@ -80,7 +78,7 @@
* @param {Frame} frame
* @return {string}
*/
-function getKey(page, frame)
+exports.getKey(page, frame)
{
let urlsWithKey = pagesWithKey.get(page);
if (!urlsWithKey)
@@ -94,8 +92,7 @@
}
return null;
-}
-exports.getKey = getKey;
+};
function verifyKey(key, signature, url)
{
@@ -132,7 +129,7 @@
* @param {Page} page
* @param {Frame} frame
*/
-function processKey(token, page, frame)
+exports.processKey = function(token, page, frame)
{
if (token.indexOf("_") < 0)
return;
@@ -142,5 +139,4 @@
if (verifyKey(key, signature, frame.url))
recordKey(page, frame.url, key);
-}
-exports.processKey = processKey;
+};
« no previous file with comments | « lib/url.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld