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

Unified Diff: chrome/common/extensions/event_filter.h

Issue 10514013: Filtered events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fix cross_incognito_args bug Created 8 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: 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(

Powered by Google App Engine
This is Rietveld 408576698