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

Unified Diff: src/plugin/PluginSettings.h

Issue 29323611: Issue #1234, #2058 - Rewrite log facility, improving thread implementation
Patch Set: Created Aug. 19, 2015, 5:42 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/plugin/PluginSettings.h
===================================================================
--- a/src/plugin/PluginSettings.h
+++ b/src/plugin/PluginSettings.h
@@ -15,91 +15,88 @@
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
-/**
-* This class contains all client functionality of the IE plugin
-*
-* Exception errors are tested by calls to ExceptionsTest from: Main ...
-*/
-
-#ifndef _PLUGIN_SETTINGS_H_
-#define _PLUGIN_SETTINGS_H_
-
-#include <map>
-
-// Main settings
-
-#define SETTING_PLUGIN_INFO_PANEL L"plugininfopanel"
-#define SETTING_PLUGIN_VERSION L"pluginversion"
-#define SETTING_PLUGIN_UPDATE_VERSION L"pluginupdateversion"
-#define SETTING_PLUGIN_SELFTEST L"pluginselftest"
-#define SETTING_LANGUAGE L"language"
-#define SETTING_DICTIONARY_VERSION L"dictionaryversion"
-
-// Tab settings
-
-#define SETTING_TAB_PLUGIN_ENABLED L"pluginenabled"
-#define SETTING_TAB_COUNT L"tabcount"
-#define SETTING_TAB_START_TIME L"tabstart"
-#define SETTING_TAB_UPDATE_ON_START L"updateonstart"
-#define SETTING_TAB_UPDATE_ON_START_REMOVE L"updateonstartremove"
-#define SETTING_TAB_DICTIONARY_VERSION L"dictionaryversion"
-#define SETTING_TAB_SETTINGS_VERSION L"settingsversion"
-#define SETTING_TAB_FILTER_VERSION L"filterversion"
-#define SETTING_TAB_WHITELIST_VERSION L"whitelistversion"
-
-class CPluginIniFileW;
-
-class CPluginSettings
-{
-private:
- static CComAutoCriticalSection s_criticalSectionLocal;
-
- void Clear();
-
- // Private constructor used by the singleton pattern
- CPluginSettings();
-
-public:
- ~CPluginSettings();
-
- static CPluginSettings* s_instance;
-
- static bool HasInstance();
- static CPluginSettings* GetInstance();
-
- bool IsPluginEnabled() const;
-
- std::map<CString, CString> GetFilterLanguageTitleList() const;
-
- DWORD m_WindowsBuildNumber;
-
-public:
-
- void TogglePluginEnabled();
- bool GetPluginEnabled() const;
-
- void AddError(const CString& error, const CString& errorCode);
-
- // Settings whitelist
-private:
- std::vector<std::wstring> m_whitelistedDomains;
- void ClearWhitelist();
- bool ReadWhitelist(bool bDebug=true);
-
-public:
- void AddWhiteListedDomain(const CString& domain);
- void RemoveWhiteListedDomain(const CString& domain);
- int GetWhiteListedDomainCount() const;
- std::vector<std::wstring> GetWhiteListedDomainList();
-
- bool RefreshWhitelist();
- DWORD GetWindowsBuildNumber();
-
- void SetSubscription(const std::wstring& url);
- void SetDefaultSubscription();
- CString GetSubscription();
- CString GetAppLocale();
- CString GetDocumentationLink();
-};
-
-#endif // _PLUGIN_SETTINGS_H_
+/**
+* This class contains all client functionality of the IE plugin
+*
+* Exception errors are tested by calls to ExceptionsTest from: Main ...
+*/
+
+#ifndef _PLUGIN_SETTINGS_H_
+#define _PLUGIN_SETTINGS_H_
+
+#include <map>
+
+// Main settings
+
+#define SETTING_PLUGIN_INFO_PANEL L"plugininfopanel"
+#define SETTING_PLUGIN_VERSION L"pluginversion"
+#define SETTING_PLUGIN_UPDATE_VERSION L"pluginupdateversion"
+#define SETTING_PLUGIN_SELFTEST L"pluginselftest"
+#define SETTING_LANGUAGE L"language"
+#define SETTING_DICTIONARY_VERSION L"dictionaryversion"
+
+// Tab settings
+
+#define SETTING_TAB_PLUGIN_ENABLED L"pluginenabled"
+#define SETTING_TAB_COUNT L"tabcount"
+#define SETTING_TAB_START_TIME L"tabstart"
+#define SETTING_TAB_UPDATE_ON_START L"updateonstart"
+#define SETTING_TAB_UPDATE_ON_START_REMOVE L"updateonstartremove"
+#define SETTING_TAB_DICTIONARY_VERSION L"dictionaryversion"
+#define SETTING_TAB_SETTINGS_VERSION L"settingsversion"
+#define SETTING_TAB_FILTER_VERSION L"filterversion"
+#define SETTING_TAB_WHITELIST_VERSION L"whitelistversion"
+
+class CPluginIniFileW;
+
+class CPluginSettings
+{
+private:
+ static CComAutoCriticalSection s_criticalSectionLocal;
+
+ void Clear();
+
+ // Private constructor used by the singleton pattern
+ CPluginSettings();
+
+public:
+ ~CPluginSettings();
+
+ static CPluginSettings* s_instance;
+
+ static CPluginSettings* GetInstance();
+
+ bool IsPluginEnabled() const;
+
+ std::map<CString, CString> GetFilterLanguageTitleList() const;
+
+ DWORD m_WindowsBuildNumber;
+
+public:
+
+ void TogglePluginEnabled();
+ bool GetPluginEnabled() const;
+
+ // Settings whitelist
+private:
+ std::vector<std::wstring> m_whitelistedDomains;
+ void ClearWhitelist();
+ bool ReadWhitelist(bool bDebug=true);
+
+public:
+ void AddWhiteListedDomain(const CString& domain);
+ void RemoveWhiteListedDomain(const CString& domain);
+ int GetWhiteListedDomainCount() const;
+ std::vector<std::wstring> GetWhiteListedDomainList();
+
+ bool RefreshWhitelist();
+ DWORD GetWindowsBuildNumber();
+
+ void SetSubscription(const std::wstring& url);
+ void SetDefaultSubscription();
+ CString GetSubscription();
+ CString GetAppLocale();
+ CString GetDocumentationLink();
+};
+
+#endif // _PLUGIN_SETTINGS_H_

Powered by Google App Engine
This is Rietveld