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

Side by Side Diff: include/AdblockPlus/FilterEngine.h

Issue 4899447913840640: Issue 1106 - Add currentVersion Pref and compareVersions API (Closed)
Patch Set: Created Aug. 1, 2014, 12:51 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 | « no previous file | lib/api.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 FilterPtr Matches(const std::string& url, 85 FilterPtr Matches(const std::string& url,
86 const std::string& contentType, 86 const std::string& contentType,
87 const std::vector<std::string>& documentUrls) const; 87 const std::vector<std::string>& documentUrls) const;
88 std::vector<std::string> GetElementHidingSelectors(const std::string& domain ) const; 88 std::vector<std::string> GetElementHidingSelectors(const std::string& domain ) const;
89 JsValuePtr GetPref(const std::string& pref) const; 89 JsValuePtr GetPref(const std::string& pref) const;
90 void SetPref(const std::string& pref, JsValuePtr value); 90 void SetPref(const std::string& pref, JsValuePtr value);
91 std::string GetHostFromURL(const std::string& url); 91 std::string GetHostFromURL(const std::string& url);
92 void ForceUpdateCheck(UpdaterCallback callback = 0); 92 void ForceUpdateCheck(UpdaterCallback callback = 0);
93 void SetFilterChangeCallback(FilterChangeCallback callback); 93 void SetFilterChangeCallback(FilterChangeCallback callback);
94 void RemoveFilterChangeCallback(); 94 void RemoveFilterChangeCallback();
95 int CompareVersions(const std::string& v1, const std::string& v2);
95 96
96 private: 97 private:
97 JsEnginePtr jsEngine; 98 JsEnginePtr jsEngine;
98 bool initialized; 99 bool initialized;
99 bool firstRun; 100 bool firstRun;
100 int updateCheckId; 101 int updateCheckId;
101 102
102 void InitDone(JsValueList& params); 103 void InitDone(JsValueList& params);
103 FilterPtr CheckFilterMatch(const std::string& url, 104 FilterPtr CheckFilterMatch(const std::string& url,
104 const std::string& contentType, 105 const std::string& contentType,
105 const std::string& documentUrl) const; 106 const std::string& documentUrl) const;
106 void UpdateCheckDone(const std::string& eventName, UpdaterCallback callback, JsValueList& params); 107 void UpdateCheckDone(const std::string& eventName, UpdaterCallback callback, JsValueList& params);
107 void FilterChanged(FilterChangeCallback callback, JsValueList& params); 108 void FilterChanged(FilterChangeCallback callback, JsValueList& params);
108 }; 109 };
109 } 110 }
110 111
111 #endif 112 #endif
OLDNEW
« no previous file with comments | « no previous file | lib/api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld