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

Delta Between Two Patch Sets: src/plugin/AdblockPlusClient.h

Issue 5316782940225536: Issue 1557 - Update to the recent libadblockplus to reduce additional updates in the logic later. (Closed)
Left Patch Set: remove debugging code Created Nov. 24, 2014, 11:09 a.m.
Right Patch Set: rebase and remove member of CFilter Created Feb. 4, 2015, 12:50 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/engine/Main.cpp ('k') | src/plugin/AdblockPlusClient.cpp » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */
17
1 #ifndef _ADBLOCK_PLUS_CLIENT_H_ 18 #ifndef _ADBLOCK_PLUS_CLIENT_H_
2 #define _ADBLOCK_PLUS_CLIENT_H_ 19 #define _ADBLOCK_PLUS_CLIENT_H_
3 20
4 21
5 #include "PluginTypedef.h" 22 #include "PluginTypedef.h"
6 #include "PluginClientBase.h" 23 #include "PluginClientBase.h"
7 #include "../shared/Communication.h" 24 #include "../shared/Communication.h"
8 #include "../shared/CriticalSection.h" 25 #include "../shared/CriticalSection.h"
9 #include <AdblockPlus/FilterEngine.h> 26 #include <AdblockPlus/FilterEngine.h>
10 27
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 static CAdblockPlusClient* GetInstance(); 66 static CAdblockPlusClient* GetInstance();
50 67
51 // Removes the url from the list of whitelisted urls if present 68 // Removes the url from the list of whitelisted urls if present
52 // Only called from ui thread 69 // Only called from ui thread
53 bool ShouldBlock(const std::wstring& src, AdblockPlus::FilterEngine::ContentTy pe contentType, const std::wstring& domain, bool addDebug=false); 70 bool ShouldBlock(const std::wstring& src, AdblockPlus::FilterEngine::ContentTy pe contentType, const std::wstring& domain, bool addDebug=false);
54 71
55 bool IsElementHidden(const std::wstring& tag, IHTMLElement* pEl, const std::ws tring& domain, const std::wstring& indent, CPluginFilter* filter); 72 bool IsElementHidden(const std::wstring& tag, IHTMLElement* pEl, const std::ws tring& domain, const std::wstring& indent, CPluginFilter* filter);
56 bool IsWhitelistedUrl(const std::wstring& url); 73 bool IsWhitelistedUrl(const std::wstring& url);
57 bool IsElemhideWhitelistedOnDomain(const std::wstring& url); 74 bool IsElemhideWhitelistedOnDomain(const std::wstring& url);
58 75
59 int GetIEVersion();
60
61 bool Matches(const std::wstring& url, AdblockPlus::FilterEngine::ContentType c ontentType, const std::wstring& domain); 76 bool Matches(const std::wstring& url, AdblockPlus::FilterEngine::ContentType c ontentType, const std::wstring& domain);
62 std::vector<std::wstring> GetElementHidingSelectors(const std::wstring& domain ); 77 std::vector<std::wstring> GetElementHidingSelectors(const std::wstring& domain );
63 std::vector<SubscriptionDescription> FetchAvailableSubscriptions(); 78 std::vector<SubscriptionDescription> FetchAvailableSubscriptions();
64 std::vector<SubscriptionDescription> GetListedSubscriptions(); 79 std::vector<SubscriptionDescription> GetListedSubscriptions();
65 bool IsAcceptableAdsEnabled(); 80 bool IsAcceptableAdsEnabled();
66 void SetSubscription(const std::wstring& url); 81 void SetSubscription(const std::wstring& url);
67 void AddSubscription(const std::wstring& url); 82 void AddSubscription(const std::wstring& url);
68 void RemoveSubscription(const std::wstring& url); 83 void RemoveSubscription(const std::wstring& url);
69 void UpdateAllSubscriptions(); 84 void UpdateAllSubscriptions();
70 std::vector<std::wstring> GetExceptionDomains(); 85 std::vector<std::wstring> GetExceptionDomains();
(...skipping 10 matching lines...) Expand all
81 std::wstring GetAppLocale(); 96 std::wstring GetAppLocale();
82 std::wstring GetDocumentationLink(); 97 std::wstring GetDocumentationLink();
83 bool TogglePluginEnabled(); 98 bool TogglePluginEnabled();
84 std::wstring GetHostFromUrl(const std::wstring& url); 99 std::wstring GetHostFromUrl(const std::wstring& url);
85 int CompareVersions(const std::wstring& v1, const std::wstring& v2); 100 int CompareVersions(const std::wstring& v1, const std::wstring& v2);
86 101
87 bool IsFirstRun(); 102 bool IsFirstRun();
88 }; 103 };
89 104
90 #endif // _ADBLOCK_PLUS_CLIENT_H_ 105 #endif // _ADBLOCK_PLUS_CLIENT_H_
LEFTRIGHT

Powered by Google App Engine
This is Rietveld