Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: compiled/RegExpFilter.h

Issue 29333474: Issue 4125 - [emscripten] Convert filter classes to C++ (Closed)
Patch Set: Replaced shared_ptr by boost-like intrusive_ptr Created Jan. 28, 2016, 7:50 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « compiled/InvalidFilter.cpp ('k') | compiled/RegExpFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #ifndef ADBLOCK_PLUS_REG_EXP_FILTER_H
2 #define ADBLOCK_PLUS_REG_EXP_FILTER_H
3
4 #include "Filter.h"
5 #include "ActiveFilter.h"
6
7 class RegExpFilter : public ActiveFilter
8 {
9 private:
10 enum TrippleState {YES, NO, ANY};
11
12 mutable int mRegexpId;
13 String mRegexpSource;
14 int mContentType;
15 bool mMatchCase;
16 TrippleState mThirdParty;
17 TrippleState mCollapse;
18 void ProcessOption(String& options, int optionStart,
19 int optionEnd, int valueStart, int valueEnd);
20 public:
21 explicit RegExpFilter(const String& text,
22 String::size_type patternStart, String::size_type patternEnd);
23 ~RegExpFilter();
24 static Filter* Create(const String& text);
25 static void InitJSTypes();
26 static String RegExpFromSource(const String& source);
27 Type GetType() const;
28 bool Matches(const String& location, int typeMask, String& docDomain,
29 bool thirdParty, const String& sitekey) const;
30 };
31
32 #endif
OLDNEW
« no previous file with comments | « compiled/InvalidFilter.cpp ('k') | compiled/RegExpFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld