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

Unified Diff: extensions/browser/event_listener_map.cc

Issue 2594193002: Only use host() for chrome:// urls in EventListener (Closed)
Patch Set: Add comment Created 4 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: extensions/browser/event_listener_map.cc
diff --git a/extensions/browser/event_listener_map.cc b/extensions/browser/event_listener_map.cc
index bd2524c26b11a43413f9d90fa81d3e72e3dc8d1c..561ebad5b7234f5d6df8da4df1fc8aec1c7b078e 100644
--- a/extensions/browser/event_listener_map.cc
+++ b/extensions/browser/event_listener_map.cc
@@ -37,8 +37,11 @@ std::unique_ptr<EventListener> EventListener::ForURL(
const GURL& listener_url,
content::RenderProcessHost* process,
std::unique_ptr<base::DictionaryValue> filter) {
- return base::WrapUnique(new EventListener(event_name, "", listener_url,
- process, std::move(filter)));
+ // Use only the origin to identify the event listener, e.g. chrome://settings
+ // for chrome://settings/accounts, to avoid multiple events being triggered
+ // for the same process. See crbug.com/536858 for details.
+ return base::WrapUnique(new EventListener(
+ event_name, "", listener_url.GetOrigin(), process, std::move(filter)));
Devlin 2016/12/27 17:12:09 for annoying reasons, let's actually make this url
stevenjb 2016/12/27 17:57:37 Done.
}
EventListener::~EventListener() {}
« 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