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

Unified Diff: webrequest.js

Issue 6615790883176448: Issue 2034 - Respect chrome.webRequest.MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES (Closed)
Patch Set: Created Feb. 23, 2015, 5:18 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
« chrome/ext/background.js ('K') | « chrome/ext/background.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrequest.js
===================================================================
--- a/webrequest.js
+++ b/webrequest.js
@@ -18,13 +18,6 @@
var FilterNotifier = require("filterNotifier").FilterNotifier;
var platform = require("info").platform;
-var onFilterChangeTimeout = null;
-function onFilterChange()
-{
- onFilterChangeTimeout = null;
- ext.webRequest.handlerBehaviorChanged();
-}
-
var importantNotifications = {
'filter.added': true,
'filter.removed': true,
@@ -39,12 +32,7 @@
FilterNotifier.addListener(function(action)
{
if (action in importantNotifications)
- {
- // Execute delayed to prevent multiple executions in a quick succession
- if (onFilterChangeTimeout != null)
- window.clearTimeout(onFilterChangeTimeout);
- onFilterChangeTimeout = window.setTimeout(onFilterChange, 2000);
- }
+ ext.webRequest.handlerBehaviorChanged();
});
function onBeforeRequest(url, type, page, frame)
« chrome/ext/background.js ('K') | « chrome/ext/background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld