Chromium Code Reviews| Index: chrome/common/extensions/event_filter.h |
| diff --git a/chrome/common/extensions/event_filter.h b/chrome/common/extensions/event_filter.h |
| index 26acb4420adf2e433fe49dff38e77c15a9538dd8..a0f2cee3f8927c5c8afb9c64805db2318a232a78 100644 |
| --- a/chrome/common/extensions/event_filter.h |
| +++ b/chrome/common/extensions/event_filter.h |
| @@ -29,6 +29,14 @@ class EventFilter { |
| // the id of the matcher, or -1 if there was an error. |
| MatcherID AddEventMatcher(const std::string& event_name, |
| scoped_ptr<EventMatcher> matcher); |
| + |
| + // Retrieve the EventMatcher with the given id. |
| + EventMatcher* GetEventMatcher(MatcherID id); |
| + |
| + // Retrieve the name of the event that the EventMatcher specified by |id| is |
| + // referring to. |
| + const std::string& GetEventName(MatcherID id); |
| + |
| // Removes an event matcher, returning the name of the event that it was for. |
| std::string RemoveEventMatcher(MatcherID id); |
| @@ -64,8 +72,8 @@ class EventFilter { |
| // and clean them up anyway. |
| void DontRemoveConditionSetsInDestructor(); |
| - const EventMatcher& event_matcher() const { |
| - return *event_matcher_; |
| + EventMatcher* event_matcher() { |
| + return event_matcher_.get(); |
|
battre
2012/06/19 14:26:23
this is part of the other CL.
koz (OOO until 15th September)
2012/06/20 08:05:56
Oops, I must have uploaded the union. Sorry about
|
| } |
| private: |
| @@ -86,7 +94,7 @@ class EventFilter { |
| // Adds the list of filters to the URL matcher, having matches for those URLs |
| // map to |id|. |
| bool CreateConditionSets(MatcherID id, |
| - base::ListValue* url_filters, |
| + EventMatcher* matcher, |
| URLMatcherConditionSet::Vector* condition_sets); |
| bool AddDictionaryAsConditionSet( |