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: Created March 24, 2015, 7:44 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/PluginClass.cpp
===================================================================
--- a/src/plugin/PluginClass.cpp
+++ b/src/plugin/PluginClass.cpp
@@ -737,6 +737,11 @@
}
s_criticalSectionLocal.Lock();
+ if (CPluginClient::GetInstance()->GetPref(L"currentVersion", L"0.0").find(L"simpleadblock") != std::wstring::npos)
+ {
+ CPluginClient::GetInstance()->SetPref(L"isFromSimpleAdblock", true);
+ CPluginClient::GetInstance()->SetPref(L"currentVersion", std::wstring(IEPLUGIN_VERSION));
Eric 2015/03/27 12:51:45 Instead of overloading "currentVersion", is it imp
Oleksandr 2015/04/16 09:58:09 We can only use one of the default prefs
+ }
int versionCompRes = CPluginClient::GetInstance()->CompareVersions(CPluginClient::GetInstance()->GetPref(L"currentVersion", L"0.0"), L"1.2");
bool isFirstRun = CPluginClient::GetInstance()->IsFirstRun();
@@ -747,7 +752,10 @@
{
if (!isFirstRun)
{
- CPluginClient::GetInstance()->SetPref(L"displayUpdatePage", true);
+ if (!CPluginClient::GetInstance()->GetPref(std::wstring(L"isFromSimpleAdblock"), false))
+ {
+ CPluginClient::GetInstance()->SetPref(L"displayUpdatePage", true);
+ }
}
// IE6 can't be accessed from another thread, execute in current thread

Powered by Google App Engine
This is Rietveld