Index: chrome/common/extensions/event_matcher.h |
diff --git a/chrome/common/extensions/event_matcher.h b/chrome/common/extensions/event_matcher.h |
index 7f9196281319193c2664354363bd608ce14565a1..db67e9cda75b1953a864210c47df54ee013045a7 100644 |
--- a/chrome/common/extensions/event_matcher.h |
+++ b/chrome/common/extensions/event_matcher.h |
@@ -19,28 +19,26 @@ class EventFilteringInfo; |
// MatchNonURLCriteria() - URL matching is handled by EventFilter. |
class EventMatcher { |
public: |
- EventMatcher(); |
+ explicit EventMatcher(scoped_ptr<base::DictionaryValue> filter); |
~EventMatcher(); |
// Returns true if |event_info| satisfies this matcher's criteria, not taking |
// into consideration any URL criteria. |
bool MatchNonURLCriteria(const EventFilteringInfo& event_info) const; |
- void set_url_filters(scoped_ptr<base::ListValue> url_filters) { |
- url_filters_ = url_filters.Pass(); |
- } |
+ int GetURLFilterCount() const; |
+ bool GetURLFilter(int i, base::DictionaryValue** url_filter_out); |
- // Returns NULL if no url_filters have been specified. |
- base::ListValue* url_filters() const { |
- return url_filters_.get(); |
+ int HasURLFilters() const { |
+ return GetURLFilterCount() != 0; |
battre
2012/06/18 12:29:17
move to .cc file?
koz (OOO until 15th September)
2012/06/19 00:07:57
Done.
|
} |
- bool has_url_filters() const { |
- return url_filters_.get() && !url_filters_->empty(); |
+ base::DictionaryValue* value() const { |
+ return filter_.get(); |
} |
private: |
- scoped_ptr<base::ListValue> url_filters_; |
+ scoped_ptr<base::DictionaryValue> filter_; |
battre
2012/06/18 12:29:17
can we add a comment about the content of filter_?
koz (OOO until 15th September)
2012/06/19 00:07:57
Done.
|
DISALLOW_COPY_AND_ASSIGN(EventMatcher); |
}; |