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

Unified Diff: src/plugin/PluginSettings.cpp

Issue 5948518908821504: Issue #1158 - removed unnecessary definitions and #ifdef/#else/#endif sections (Closed)
Patch Set: Created Aug. 6, 2014, 7:38 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.cpp
===================================================================
--- a/src/plugin/PluginSettings.cpp
+++ b/src/plugin/PluginSettings.cpp
@@ -5,9 +5,7 @@
#include "PluginSettings.h"
#include "PluginClient.h"
#include "PluginSystem.h"
-#ifdef SUPPORT_FILTER
#include "PluginFilter.h"
-#endif
#include "PluginMutex.h"
#include "../shared/Utils.h"
#include <memory>
@@ -33,8 +31,6 @@
char sPluginId[44];
};
-#ifdef SUPPORT_WHITELIST
-
class CPluginSettingsWhitelistLock : public CPluginMutex
{
public:
@@ -42,31 +38,21 @@
~CPluginSettingsWhitelistLock() {}
};
-#endif
-
CPluginSettings* CPluginSettings::s_instance = NULL;
-
CComAutoCriticalSection CPluginSettings::s_criticalSectionLocal;
-
CPluginSettings::CPluginSettings() : m_dwWorkingThreadId(0)
{
s_instance = NULL;
-
m_WindowsBuildNumber = 0;
-
-#ifdef SUPPORT_WHITELIST
ClearWhitelist();
-#endif
}
-
CPluginSettings::~CPluginSettings()
{
s_instance = NULL;
}
-
CPluginSettings* CPluginSettings::GetInstance()
{
CPluginSettings* instance = NULL;
@@ -161,8 +147,6 @@
// Whitelist settings
// ============================================================================
-#ifdef SUPPORT_WHITELIST
-
void CPluginSettings::ClearWhitelist()
{
s_criticalSectionLocal.Lock();
@@ -172,7 +156,6 @@
s_criticalSectionLocal.Unlock();
}
-
bool CPluginSettings::ReadWhitelist(bool isDebug)
{
bool isRead = true;
@@ -201,7 +184,6 @@
return isRead;
}
-
void CPluginSettings::AddWhiteListedDomain(const CString& domain)
{
DEBUG_SETTINGS("SettingsWhitelist::AddWhiteListedDomain domain:" + domain)
@@ -227,7 +209,6 @@
return count;
}
-
std::vector<std::wstring> CPluginSettings::GetWhiteListedDomainList()
{
bool r = ReadWhitelist(false);
@@ -296,7 +277,3 @@
{
return CString(CPluginClient::GetInstance()->GetDocumentationLink().c_str());
}
-
-
-
-#endif // SUPPORT_WHITELIST

Powered by Google App Engine
This is Rietveld