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

Unified Diff: Shared/PluginSettings.cpp

Issue 8949229: Removal of all user tracking and shareware parts (Closed)
Patch Set: Created Dec. 6, 2012, 4: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: Shared/PluginSettings.cpp
===================================================================
--- a/Shared/PluginSettings.cpp
+++ b/Shared/PluginSettings.cpp
@@ -233,54 +233,6 @@
{
if (m_settingsFile->IsValidChecksum())
{
- s_criticalSectionLocal.Lock();
- {
- m_properties = m_settingsFile->GetSectionData("Settings");
-
- // Delete obsolete properties
- TProperties::iterator it = m_properties.find("pluginupdate");
- if (it != m_properties.end())
- {
- m_properties.erase(it);
- m_isDirty = true;
- }
-
- it = m_properties.find("pluginerrors");
- if (it != m_properties.end())
- {
- m_properties.erase(it);
- m_isDirty = true;
- }
-
- it = m_properties.find("pluginerrorcodes");
- if (it != m_properties.end())
- {
- m_properties.erase(it);
- m_isDirty = true;
- }
-
- it = m_properties.find("pluginenabled");
- if (it != m_properties.end())
- {
- m_properties.erase(it);
- m_isDirty = true;
- }
-
- // Convert property 'pluginid' to 'userid'
- if (m_properties.find(SETTING_USER_ID) == m_properties.end())
- {
- it = m_properties.find("pluginid");
- if (it != m_properties.end())
- {
- m_properties[SETTING_USER_ID] = it->second;
-
- m_properties.erase(it);
- m_isDirty = true;
- }
- }
- }
- s_criticalSectionLocal.Unlock();
-
#ifdef SUPPORT_FILTER
// Unpack filter URLs
CPluginIniFileW::TSectionData filters = m_settingsFile->GetSectionData("Filters");
@@ -360,11 +312,9 @@
{
m_properties.clear();
- m_properties[SETTING_PLUGIN_EXPIRED] = "false";
m_properties[SETTING_PLUGIN_VERSION] = IEPLUGIN_VERSION;
m_properties[SETTING_LANGUAGE] = "en";
m_properties[SETTING_DICTIONARY_VERSION] = "1";
- m_properties[SETTING_PLUGIN_REGISTRATION] = "false";
}
s_criticalSectionLocal.Unlock();
@@ -593,47 +543,6 @@
s_criticalSectionLocal.Lock();
{
-
- if (key == SETTING_PLUGIN_ID)
- {
-#ifdef CONFIG_IN_REGISTRY
- DWORD dwResult = NULL;
- HKEY hKey;
- RegOpenKey(HKEY_CURRENT_USER, L"SOFTWARE\\SimpleAdblock", &hKey);
- DWORD type = 0;
- WCHAR pid[250];
- DWORD cbData;
- dwResult = ::RegQueryValueEx(hKey, L"PluginId", NULL, &type, (BYTE*)pid, &cbData);
- if (dwResult == ERROR_SUCCESS)
- {
- CString pluginId = pid;
- ::RegCloseKey(hKey);
- s_criticalSectionLocal.Unlock();
- return pluginId;
- }
-#endif
- }
-
- if (key == SETTING_USER_ID)
- {
-#ifdef CONFIG_IN_REGISTRY
- DWORD dwResult = NULL;
- HKEY hKey;
- RegOpenKey(HKEY_CURRENT_USER, L"SOFTWARE\\SimpleAdblock", &hKey);
- DWORD type = 0;
- WCHAR pid[250];
- DWORD cbData;
- dwResult = ::RegQueryValueEx(hKey, L"UserId", NULL, &type, (BYTE*)pid, &cbData);
- if (dwResult == ERROR_SUCCESS)
- {
- CString userId = pid;
- ::RegCloseKey(hKey);
- s_criticalSectionLocal.Unlock();
- return userId;
- }
-#endif
- }
-
TProperties::const_iterator it = m_properties.find(key);
if (it != m_properties.end())
{
@@ -750,7 +659,7 @@
bool CPluginSettings::IsPluginEnabled() const
{
- return m_isPluginEnabledTab && !GetBool(SETTING_PLUGIN_EXPIRED, false);
+ return m_isPluginEnabledTab;
}
@@ -1452,14 +1361,6 @@
}
bool CPluginSettings::GetPluginEnabled() const
{
- //Display plugin as disabled if limit is passed
- CPluginSettings* settings = CPluginSettings::GetInstance();
- if (!settings->GetBool(SETTING_PLUGIN_REGISTRATION, false) &&
- (settings->GetValue(SETTING_PLUGIN_ADBLOCKCOUNT, 0) >= settings->GetValue(SETTING_PLUGIN_ADBLOCKLIMIT, 0)) &&
- (settings->GetValue(SETTING_PLUGIN_ADBLOCKLIMIT, 0) > 0))
- {
- return false;
- }
return m_isPluginEnabledTab;
}

Powered by Google App Engine
This is Rietveld