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

Unified Diff: src/plugin/PluginConfiguration.cpp

Issue 10800092: Use libadblockplus update checker (Closed)
Patch Set: Addressed review comments Created June 7, 2013, 5:27 a.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/PluginConfiguration.cpp
===================================================================
--- a/src/plugin/PluginConfiguration.cpp
+++ b/src/plugin/PluginConfiguration.cpp
@@ -16,17 +16,16 @@ CPluginConfiguration::CPluginConfigurati
void CPluginConfiguration::Invalidate()
{
m_isValid = false;
m_isValidUserId = false;
m_isValidPluginActivated = false;
m_isValidPluginActivateEnabled = false;
m_isValidPluginExpired = false;
- m_isValidPluginUpdate = false;
m_isValidPluginInfoPanel = false;
m_isValidDictionary = false;
#ifdef SUPPORT_FILTER
m_isValidFilter = false;
#endif
#ifdef SUPPORT_WHITELIST
m_isValidWhiteList = false;
#endif
@@ -93,29 +92,16 @@ bool CPluginConfiguration::Download()
}
const std::auto_ptr<CPluginIniFile>& iniFile = httpRequest.GetResponseFile();
// Unpack settings
CPluginIniFile::TSectionData settingsData = iniFile->GetSectionData("Settings");
CPluginIniFile::TSectionData::iterator it;
- it = settingsData.find("pluginupdate");
- if (it != settingsData.end())
- {
- m_pluginUpdateUrl = it->second;
- DEBUG_SETTINGS("Settings::Configuration plugin update url:" + it->second);
- }
-
- it = settingsData.find("pluginupdatev");
- if (it != settingsData.end())
- {
- m_pluginUpdateVersion = it->second;
- DEBUG_SETTINGS("Settings::Configuration plugin update version:" + it->second);
- }
it = settingsData.find("userid");
if (it != settingsData.end())
{
m_userId = it->second;
DEBUG_SETTINGS("Settings::Configuration user id:" + it->second);
}
it = settingsData.find("dictionary");
@@ -127,26 +113,22 @@ bool CPluginConfiguration::Download()
it = settingsData.find("dictionaryv");
if (it != settingsData.end())
{
m_dictionaryVersion = atoi(it->second);
DEBUG_SETTINGS("Settings::Configuration dictionary version:" + it->second);
}
- m_isValidPluginUpdate =
- settingsData.find("pluginupdate") != settingsData.end() &&
- settingsData.find("pluginupdatev") != settingsData.end();
-
m_isValidUserId =
settingsData.find("userid") != settingsData.end();
m_isValidDictionary =
- settingsData.find("dictionary") != settingsData.end() &&
- settingsData.find("dictionaryv") != settingsData.end();
+ settingsData.find("dictionary") != settingsData.end() &&
+ settingsData.find("dictionaryv") != settingsData.end();
it = settingsData.find("plugininfopanel");
if (it != settingsData.end())
{
m_isValidPluginInfoPanel = true;
m_pluginInfoPanel = atoi(it->second);
DEBUG_SETTINGS("Settings::Configuration plugin info panel:" + it->second);
}
@@ -213,39 +195,27 @@ bool CPluginConfiguration::IsValidUserId
bool CPluginConfiguration::IsValidPluginExpired() const
{
return m_isValidPluginExpired;
}
-bool CPluginConfiguration::IsValidPluginUpdate() const
-{
- return m_isValidPluginUpdate;
-}
-
-
-bool CPluginConfiguration::IsValidDictionary() const
-{
- return m_isValidDictionary;
-}
-
-
bool CPluginConfiguration::IsPluginActivated() const
{
return m_isPluginActivated;
}
-bool CPluginConfiguration::IsPluginRegistered() const
+bool CPluginConfiguration::IsPluginRegistered() const
{
return m_isPluginRegistered;
}
-int CPluginConfiguration::GetAdBlockLimit() const
+int CPluginConfiguration::GetAdBlockLimit() const
{
return m_adBlockLimit;
}
bool CPluginConfiguration::IsPluginActivateEnabled() const
{
return m_isPluginActivateEnabled;
@@ -299,28 +269,16 @@ CString CPluginConfiguration::GetUserId(
int CPluginConfiguration::GetPluginInfoPanel() const
{
return m_pluginInfoPanel;
}
-CString CPluginConfiguration::GetPluginUpdateUrl() const
-{
- return PLUGIN_UPDATE_URL;
-}
-
-
-CString CPluginConfiguration::GetPluginUpdateVersion() const
-{
- return m_pluginUpdateVersion;
-}
-
-
int CPluginConfiguration::GetDictionaryVersion() const
{
return m_dictionaryVersion;
}
CString CPluginConfiguration::GetDictionaryUrl() const
{

Powered by Google App Engine
This is Rietveld