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

Unified Diff: chrome/browser/extensions/extension_webrequest_api.cc

Issue 8772058: Clear in-memory cache after adding or deleting an event handler to ensure it is effective (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_webrequest_api.cc
diff --git a/chrome/browser/extensions/extension_webrequest_api.cc b/chrome/browser/extensions/extension_webrequest_api.cc
index 3c6bcca149284a3492d74a56065ffcf49aa3e422..f1ee72dad890c4236ec309bd80186f5bd20cc877 100644
--- a/chrome/browser/extensions/extension_webrequest_api.cc
+++ b/chrome/browser/extensions/extension_webrequest_api.cc
@@ -1039,6 +1039,9 @@ void ExtensionWebRequestEventRouter::RemoveEventListener(
}
listeners_[profile][event_name].erase(listener);
+
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+ base::Bind(&ClearCacheOnNavigationOnUI));
}
void ExtensionWebRequestEventRouter::OnOTRProfileCreated(
@@ -1494,6 +1497,9 @@ bool WebRequestAddEventListener::RunImpl() {
event_name, sub_event_name, filter,
extra_info_spec, ipc_sender_weak());
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+ base::Bind(&ClearCacheOnNavigationOnUI));
+
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind(
&NotifyWebRequestAPIUsed,
profile_id(), make_scoped_refptr(GetExtension())));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698