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

Unified Diff: src/plugin/PluginClass.cpp

Issue 5024350814076928: Issue 1103 - Migrate Simple Adblock users
Patch Set: Rebased Created July 28, 2015, 9:55 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
« no previous file with comments | « locales/en.ini ('k') | src/plugin/PluginUserSettings.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginClass.cpp
===================================================================
--- a/src/plugin/PluginClass.cpp
+++ b/src/plugin/PluginClass.cpp
@@ -705,9 +705,14 @@
{
return false;
}
-
s_criticalSectionLocal.Lock();
- int versionCompRes = CPluginClient::GetInstance()->CompareVersions(CPluginClient::GetInstance()->GetPref(L"currentVersion", L"0.0"), L"1.2");
+ std::wstring curVer = CPluginClient::GetInstance()->GetPref(L"currentVersion", L"0.0");
+ // The plugin version can be "simpleadblock", which doesn't have the "."
+ if (curVer.find(L".") == std::wstring::npos)
+ {
+ CPluginClient::GetInstance()->SetPref(L"convertedFrom", curVer);
+ }
+ int versionCompRes = CPluginClient::GetInstance()->CompareVersions(curVer, L"1.2");
bool isFirstRun = CPluginClient::GetInstance()->IsFirstRun();
CPluginClient::GetInstance()->SetPref(L"currentVersion", std::wstring(IEPLUGIN_VERSION));
@@ -717,7 +722,11 @@
{
if (!isFirstRun)
{
- CPluginClient::GetInstance()->SetPref(L"displayUpdatePage", true);
+ // Display an update page only if it's not a conversion from other product
+ if (CPluginClient::GetInstance()->GetPref(L"convertedFrom", L"") == L"")
+ {
+ CPluginClient::GetInstance()->SetPref(L"displayUpdatePage", true);
+ }
}
// IE6 can't be accessed from another thread, execute in current thread
« no previous file with comments | « locales/en.ini ('k') | src/plugin/PluginUserSettings.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld