| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef EXTENSIONS_COMMON_EVENT_MATCHER_H_ | 5 #ifndef EXTENSIONS_COMMON_EVENT_MATCHER_H_ |
| 6 #define EXTENSIONS_COMMON_EVENT_MATCHER_H_ | 6 #define EXTENSIONS_COMMON_EVENT_MATCHER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 | 12 |
| 13 namespace extensions { | 13 namespace extensions { |
| 14 | 14 struct EventFilteringInfo; |
| 15 class EventFilteringInfo; | |
| 16 | 15 |
| 17 extern const char kEventFilterServiceTypeKey[]; | 16 extern const char kEventFilterServiceTypeKey[]; |
| 18 | 17 |
| 19 // Matches EventFilteringInfos against a set of criteria. This is intended to | 18 // Matches EventFilteringInfos against a set of criteria. This is intended to |
| 20 // be used by EventFilter which performs efficient URL matching across | 19 // be used by EventFilter which performs efficient URL matching across |
| 21 // potentially many EventMatchers itself. This is why this class only exposes | 20 // potentially many EventMatchers itself. This is why this class only exposes |
| 22 // MatchNonURLCriteria() - URL matching is handled by EventFilter. | 21 // MatchNonURLCriteria() - URL matching is handled by EventFilter. |
| 23 class EventMatcher { | 22 class EventMatcher { |
| 24 public: | 23 public: |
| 25 EventMatcher(std::unique_ptr<base::DictionaryValue> filter, int routing_id); | 24 EventMatcher(std::unique_ptr<base::DictionaryValue> filter, int routing_id); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 const std::unique_ptr<base::DictionaryValue> filter_; | 57 const std::unique_ptr<base::DictionaryValue> filter_; |
| 59 | 58 |
| 60 const int routing_id_; | 59 const int routing_id_; |
| 61 | 60 |
| 62 DISALLOW_COPY_AND_ASSIGN(EventMatcher); | 61 DISALLOW_COPY_AND_ASSIGN(EventMatcher); |
| 63 }; | 62 }; |
| 64 | 63 |
| 65 } // namespace extensions | 64 } // namespace extensions |
| 66 | 65 |
| 67 #endif // EXTENSIONS_COMMON_EVENT_MATCHER_H_ | 66 #endif // EXTENSIONS_COMMON_EVENT_MATCHER_H_ |
| OLD | NEW |