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

Unified Diff: extensions/common/event_filter.cc

Issue 2937623002: [Extensions] Simplify EventFilteringInfo (Closed)
Patch Set: karan's Created 3 years, 6 months 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
Index: extensions/common/event_filter.cc
diff --git a/extensions/common/event_filter.cc b/extensions/common/event_filter.cc
index aa3951308165fda51008b755c7f154b6b1e00073..c382b94d7f4e3f72cc0ab40a22e416b1e525e549 100644
--- a/extensions/common/event_filter.cc
+++ b/extensions/common/event_filter.cc
@@ -144,7 +144,7 @@ std::set<EventFilter::MatcherID> EventFilter::MatchEvent(
const EventMatcherMap& matcher_map = it->second;
const GURL& url_to_match_against =
- event_info.has_url() ? event_info.url() : GURL::EmptyGURL();
+ event_info.url ? *event_info.url : GURL::EmptyGURL();
std::set<URLMatcherConditionSet::ID> matching_condition_set_ids =
url_matcher_.MatchURL(url_to_match_against);
for (const auto& id_key : matching_condition_set_ids) {
@@ -167,7 +167,7 @@ std::set<EventFilter::MatcherID> EventFilter::MatchEvent(
continue;
}
if (event_matcher->MatchNonURLCriteria(event_info)) {
- CHECK(!event_matcher->HasURLFilters() || event_info.has_url());
+ CHECK(!event_matcher->HasURLFilters() || event_info.url);
matchers.insert(id);
}
}
« no previous file with comments | « extensions/browser/guest_view/extensions_guest_view_manager_delegate.cc ('k') | extensions/common/event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698