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

Side by Side Diff: src/plugin/AdblockPlusClient.h

Issue 29333441: Noissue - Change 'CPluginFilter::ShouldBlock()' to local function (Closed)
Patch Set: Created Jan. 14, 2016, 2:29 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 | src/plugin/AdblockPlusClient.cpp » ('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 <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 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 20 matching lines...) Expand all
31 std::wstring title; 31 std::wstring title;
32 std::wstring specialization; 32 std::wstring specialization;
33 bool listed; 33 bool listed;
34 }; 34 };
35 35
36 class CAdblockPlusClient 36 class CAdblockPlusClient
37 { 37 {
38 38
39 private: 39 private:
40 40
41 std::auto_ptr<CPluginFilter> m_filter;
42
43 CComAutoCriticalSection m_criticalSectionFilter; 41 CComAutoCriticalSection m_criticalSectionFilter;
44 CComAutoCriticalSection m_criticalSectionCache; 42 CComAutoCriticalSection m_criticalSectionCache;
45 static CComAutoCriticalSection s_criticalSectionLocal; 43 static CComAutoCriticalSection s_criticalSectionLocal;
46 44
47 std::map<std::wstring, bool> m_cacheBlockedSources; 45 std::map<std::wstring, bool> m_cacheBlockedSources;
48 46
49 std::shared_ptr<Communication::Pipe> enginePipe; 47 std::shared_ptr<Communication::Pipe> enginePipe;
50 CriticalSection enginePipeLock; 48 CriticalSection enginePipeLock;
51 49
52 50
53 // Private constructor used by the singleton pattern 51 // Private constructor used by the singleton pattern
54 CAdblockPlusClient(); 52 CAdblockPlusClient() {};
55 53
56 bool CallEngine(Communication::OutputBuffer& message, Communication::InputBuff er& inputBuffer = Communication::InputBuffer()); 54 bool CallEngine(Communication::OutputBuffer& message, Communication::InputBuff er& inputBuffer = Communication::InputBuffer());
57 bool CallEngine(Communication::ProcType proc, Communication::InputBuffer& inpu tBuffer = Communication::InputBuffer()); 55 bool CallEngine(Communication::ProcType proc, Communication::InputBuffer& inpu tBuffer = Communication::InputBuffer());
58 public: 56 public:
59 57
60 static CAdblockPlusClient* s_instance; 58 static CAdblockPlusClient* s_instance;
61 59
62 ~CAdblockPlusClient(); 60 ~CAdblockPlusClient();
63 61
64 static CAdblockPlusClient* GetInstance(); 62 static CAdblockPlusClient* GetInstance();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 bool TogglePluginEnabled(); 95 bool TogglePluginEnabled();
98 std::wstring GetHostFromUrl(const std::wstring& url); 96 std::wstring GetHostFromUrl(const std::wstring& url);
99 int CompareVersions(const std::wstring& v1, const std::wstring& v2); 97 int CompareVersions(const std::wstring& v1, const std::wstring& v2);
100 98
101 bool IsFirstRun(); 99 bool IsFirstRun();
102 }; 100 };
103 101
104 typedef CAdblockPlusClient CPluginClient; 102 typedef CAdblockPlusClient CPluginClient;
105 103
106 #endif // _ADBLOCK_PLUS_CLIENT_H_ 104 #endif // _ADBLOCK_PLUS_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | src/plugin/AdblockPlusClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld