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

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

Issue 5187613258416128: Issue #1234 - Rewrite internals of debug facility (Closed)
Left Patch Set: capitalize a function name Created March 20, 2015, 10:09 a.m.
Right Patch Set: rebase only Created Nov. 26, 2015, 1:02 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
LEFTRIGHT
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
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 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/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 /** 18 /**
19 * This class contains all client functionality of the IE plugin 19 * This class contains all client functionality of the IE plugin
20 * 20 *
21 * Exception errors are tested by calls to ExceptionsTest from: Main ... 21 * Exception errors are tested by calls to ExceptionsTest from: Main ...
22 */ 22 */
23 23
24 #ifndef _PLUGIN_SETTINGS_H_ 24 #ifndef _PLUGIN_SETTINGS_H_
25 #define _PLUGIN_SETTINGS_H_ 25 #define _PLUGIN_SETTINGS_H_
26 26
27 #include "AdblockPlusClient.h" 27 #include <map>
28 28
29 // Main settings 29 // Main settings
30 30
31 #define SETTING_PLUGIN_INFO_PANEL L"plugininfopanel" 31 #define SETTING_PLUGIN_INFO_PANEL L"plugininfopanel"
32 #define SETTING_PLUGIN_VERSION L"pluginversion" 32 #define SETTING_PLUGIN_VERSION L"pluginversion"
33 #define SETTING_PLUGIN_UPDATE_VERSION L"pluginupdateversion" 33 #define SETTING_PLUGIN_UPDATE_VERSION L"pluginupdateversion"
34 #define SETTING_PLUGIN_SELFTEST L"pluginselftest" 34 #define SETTING_PLUGIN_SELFTEST L"pluginselftest"
35 #define SETTING_LANGUAGE L"language" 35 #define SETTING_LANGUAGE L"language"
36 #define SETTING_DICTIONARY_VERSION L"dictionaryversion" 36 #define SETTING_DICTIONARY_VERSION L"dictionaryversion"
37 37
(...skipping 24 matching lines...) Expand all
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(); 67 static bool HasInstance();
68 static CPluginSettings* GetInstance(); 68 static CPluginSettings* GetInstance();
69 69
70 bool IsPluginEnabled() const; 70 bool IsPluginEnabled() const;
71 71
72 std::map<CString, CString> GetFilterLanguageTitleList() const; 72 std::map<std::wstring, std::wstring> GetFilterLanguageTitleList() const;
73
74 DWORD m_WindowsBuildNumber;
75 73
76 public: 74 public:
77 75
78 void TogglePluginEnabled(); 76 void TogglePluginEnabled();
79 bool GetPluginEnabled() const; 77 bool GetPluginEnabled() const;
80 78
81 void AddError(const CString& error, const CString& errorCode); 79 void AddError(const CString& error, const CString& errorCode);
82 80
83 // Settings whitelist 81 // Settings whitelist
84 private: 82 private:
85 std::vector<std::wstring> m_whitelistedDomains; 83 std::vector<std::wstring> m_whitelistedDomains;
86 void ClearWhitelist(); 84 void ClearWhitelist();
87 bool ReadWhitelist(bool bDebug=true); 85 bool ReadWhitelist(bool bDebug=true);
88 86
89 public: 87 public:
90 void AddWhiteListedDomain(const CString& domain); 88 void AddWhiteListedDomain(const std::wstring& domain);
91 void RemoveWhiteListedDomain(const CString& domain); 89 void RemoveWhiteListedDomain(const std::wstring& domain);
92 int GetWhiteListedDomainCount() const; 90 int GetWhiteListedDomainCount() const;
93 std::vector<std::wstring> GetWhiteListedDomainList(); 91 std::vector<std::wstring> GetWhiteListedDomainList();
94 92
95 bool RefreshWhitelist(); 93 bool RefreshWhitelist();
96 DWORD GetWindowsBuildNumber();
97 94
98 void SetSubscription(const std::wstring& url); 95 void SetSubscription(const std::wstring& url);
99 void SetDefaultSubscription(); 96 std::wstring GetSubscription();
100 CString GetSubscription();
101 CString GetAppLocale();
102 CString GetDocumentationLink();
103 }; 97 };
104 98
105 #endif // _PLUGIN_SETTINGS_H_ 99 #endif // _PLUGIN_SETTINGS_H_
LEFTRIGHT

Powered by Google App Engine
This is Rietveld