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

Unified Diff: extensions/browser/event_listener_map.cc

Issue 2594193002: Only use host() for chrome:// urls in EventListener (Closed)
Patch Set: Use GetOrigin for all listener_urls 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..a2f512dc957803b4c0cf2bc430b783bede237307 100644
--- a/extensions/browser/event_listener_map.cc
+++ b/extensions/browser/event_listener_map.cc
@@ -37,8 +37,8 @@ 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)));
+ return base::WrapUnique(new EventListener(
Dan Beam 2016/12/22 01:51:19 nit: MakeUnique<EventListener>(...)
stevenjb 2016/12/22 01:55:29 WrapUnique is used here because the constructor is
Dan Beam 2016/12/22 01:57:18 ah, fair
+ event_name, "", listener_url.GetOrigin(), process, std::move(filter)));
Devlin 2016/12/22 16:01:09 let's add a comment saying why we do this.
stevenjb 2016/12/22 19:06:05 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