Index: src/plugin/PluginClass.cpp |
=================================================================== |
--- a/src/plugin/PluginClass.cpp |
+++ b/src/plugin/PluginClass.cpp |
@@ -851,8 +851,15 @@ |
return false; |
} |
- if (CPluginClient::GetInstance()->IsFirstRun()) |
+ s_criticalSectionLocal.Lock(); |
+ int versionCompRes = CPluginClient::GetInstance()->CompareVersions(CPluginClient::GetInstance()->GetPref(L"currentVersion", L"0.0"), L"1.2"); |
+ |
+ // This is the first time ABP was installed |
+ // Or ABP was updated from the version that did not support Acceptable Ads (<1.2) |
+ if (CPluginClient::GetInstance()->IsFirstRun() || versionCompRes < 0) |
{ |
+ CPluginClient::GetInstance()->SetPref(L"currentVersion", std::wstring(IEPLUGIN_VERSION)); |
Felix Dahlke
2014/08/01 13:07:57
I think we should also update currentVersion when
|
+ |
// IE6 can't be accessed from another thread, execute in current thread |
if (ieVersion < 7) |
Felix Dahlke
2014/08/01 13:07:57
Should we really run these first run actions again
|
{ |
@@ -867,7 +874,11 @@ |
ShowStatusBar(); |
} |
+ // Enable acceptable ads by default |
+ std::wstring aaUrl = CPluginClient::GetInstance()->GetPref(L"subscriptions_exceptionsurl", L""); |
+ CPluginClient::GetInstance()->AddSubscription(aaUrl); |
} |
+ s_criticalSectionLocal.Unlock(); |
return true; |
} |