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

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

Issue 29323611: Issue #1234, #2058 - Rewrite log facility, improving thread implementation
Patch Set: address comments Created Feb. 4, 2016, 8:59 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 | « src/plugin/PluginMutex.cpp ('k') | src/plugin/PluginSettings.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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void Clear(); 57 void Clear();
58 58
59 // Private constructor used by the singleton pattern 59 // Private constructor used by the singleton pattern
60 CPluginSettings(); 60 CPluginSettings();
61 61
62 public: 62 public:
63 ~CPluginSettings(); 63 ~CPluginSettings();
64 64
65 static CPluginSettings* s_instance; 65 static CPluginSettings* s_instance;
66 66
67 static bool HasInstance();
68 static CPluginSettings* GetInstance(); 67 static CPluginSettings* GetInstance();
69 68
70 bool IsPluginEnabled() const; 69 bool IsPluginEnabled() const;
71 70
72 std::map<std::wstring, std::wstring> GetFilterLanguageTitleList() const; 71 std::map<std::wstring, std::wstring> GetFilterLanguageTitleList() const;
73 72
74 public: 73 public:
75 74
76 void TogglePluginEnabled(); 75 void TogglePluginEnabled();
77 bool GetPluginEnabled() const; 76 bool GetPluginEnabled() const;
78 77
79 void AddError(const CString& error, const CString& errorCode);
80
81 // Settings whitelist 78 // Settings whitelist
82 private: 79 private:
83 std::vector<std::wstring> m_whitelistedDomains; 80 std::vector<std::wstring> m_whitelistedDomains;
84 void ClearWhitelist(); 81 void ClearWhitelist();
85 bool ReadWhitelist(bool bDebug=true); 82 bool ReadWhitelist(bool bDebug=true);
86 83
87 public: 84 public:
88 void AddWhiteListedDomain(const std::wstring& domain); 85 void AddWhiteListedDomain(const std::wstring& domain);
89 void RemoveWhiteListedDomain(const std::wstring& domain); 86 void RemoveWhiteListedDomain(const std::wstring& domain);
90 int GetWhiteListedDomainCount() const; 87 int GetWhiteListedDomainCount() const;
91 std::vector<std::wstring> GetWhiteListedDomainList(); 88 std::vector<std::wstring> GetWhiteListedDomainList();
92 89
93 bool RefreshWhitelist(); 90 bool RefreshWhitelist();
94 91
95 void SetSubscription(const std::wstring& url); 92 void SetSubscription(const std::wstring& url);
96 std::wstring GetSubscription(); 93 std::wstring GetSubscription();
97 }; 94 };
98 95
99 #endif // _PLUGIN_SETTINGS_H_ 96 #endif // _PLUGIN_SETTINGS_H_
OLDNEW
« no previous file with comments | « src/plugin/PluginMutex.cpp ('k') | src/plugin/PluginSettings.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld