summaryrefslogtreecommitdiffstats
path: root/extensions/common/event_matcher.cc
diff options
context:
space:
mode:
authorhenrika@chromium.org <henrika@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-06 10:09:31 +0000
committerhenrika@chromium.org <henrika@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-06 10:09:31 +0000
commit006899ce9ca80799593d6c8f056cae9c00c5d71d (patch)
treed61138d41c620b9d860083eb954761e0b33e34c1 /extensions/common/event_matcher.cc
parenta444361146cb899033ebb0f993678f7f05ffe301 (diff)
downloadchromium_src-006899ce9ca80799593d6c8f056cae9c00c5d71d.zip
chromium_src-006899ce9ca80799593d6c8f056cae9c00c5d71d.tar.gz
chromium_src-006899ce9ca80799593d6c8f056cae9c00c5d71d.tar.bz2
Revert 221619 "Initial chrome.mdns API."
> Initial chrome.mdns API. > Currently just implements the API layer which allows adding a listener and defines a manifest key to specify mdns service types to watch. > > BUG=280900 > TBR=erg > > Review URL: https://chromiumcodereview.appspot.com/23437015 TBR=justinlin@chromium.org Review URL: https://codereview.chromium.org/23945003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221668 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/common/event_matcher.cc')
-rw-r--r--extensions/common/event_matcher.cc17
1 files changed, 3 insertions, 14 deletions
diff --git a/extensions/common/event_matcher.cc b/extensions/common/event_matcher.cc
index 8ae022a..ad76c89 100644
--- a/extensions/common/event_matcher.cc
+++ b/extensions/common/event_matcher.cc
@@ -12,8 +12,6 @@ const char kUrlFiltersKey[] = "url";
namespace extensions {
-const char kEventFilterServiceTypeKey[] = "serviceType";
-
EventMatcher::EventMatcher(scoped_ptr<base::DictionaryValue> filter,
int routing_id)
: filter_(filter.Pass()),
@@ -25,13 +23,10 @@ EventMatcher::~EventMatcher() {
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 @@ int EventMatcher::HasURLFilters() const {
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);