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

Unified Diff: trunk/src/extensions/common/event_matcher.cc

Issue 23945003: Revert 221619 "Initial chrome.mdns API." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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
« no previous file with comments | « trunk/src/extensions/common/event_matcher.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/extensions/common/event_matcher.cc
===================================================================
--- trunk/src/extensions/common/event_matcher.cc (revision 221667)
+++ trunk/src/extensions/common/event_matcher.cc (working copy)
@@ -12,8 +12,6 @@
namespace extensions {
-const char kEventFilterServiceTypeKey[] = "serviceType";
-
EventMatcher::EventMatcher(scoped_ptr<base::DictionaryValue> filter,
int routing_id)
: filter_(filter.Pass()),
@@ -25,13 +23,10 @@
bool EventMatcher::MatchNonURLCriteria(
const EventFilteringInfo& event_info) const {
- if (event_info.has_instance_id()) {
- return event_info.instance_id() == GetInstanceID();
- }
+ if (!event_info.has_instance_id())
+ return true;
- const std::string& service_type_filter = GetServiceTypeFilter();
- return service_type_filter.empty() ||
- service_type_filter == event_info.service_type();
+ return event_info.instance_id() == GetInstanceID();
}
int EventMatcher::GetURLFilterCount() const {
@@ -53,12 +48,6 @@
return GetURLFilterCount() != 0;
}
-std::string EventMatcher::GetServiceTypeFilter() const {
- std::string service_type_filter;
- filter_->GetStringASCII(kEventFilterServiceTypeKey, &service_type_filter);
- return service_type_filter;
-}
-
int EventMatcher::GetInstanceID() const {
int instance_id = 0;
filter_->GetInteger("instanceId", &instance_id);
« no previous file with comments | « trunk/src/extensions/common/event_matcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698