Index: src/plugin/PluginUserSettings.cpp |
=================================================================== |
--- a/src/plugin/PluginUserSettings.cpp |
+++ b/src/plugin/PluginUserSettings.cpp |
@@ -41,6 +41,7 @@ |
dispatchID_IsAcceptableAdsEnabled, |
dispatchID_SetAcceptableAdsEnabled, |
dispatchID_IsUpdate, |
+ dispatchID_IsFromSimpleAdblock |
}; |
/** |
@@ -66,6 +67,7 @@ |
m.emplace(L"IsAcceptableAdsEnabled", dispatchID_IsAcceptableAdsEnabled); |
m.emplace(L"SetAcceptableAdsEnabled", dispatchID_SetAcceptableAdsEnabled); |
m.emplace(L"IsUpdate", dispatchID_IsUpdate); |
+ m.emplace(L"IsFromSimpleAdblock", dispatchID_IsFromSimpleAdblock); |
Eric
2015/03/27 12:51:45
I would prefer an API here that's a bit more gener
|
} |
catch(...) |
{ |
@@ -442,6 +444,19 @@ |
} |
} |
break; |
+ case dispatchID_IsFromSimpleAdblock: |
+ { |
+ if (pDispparams->cArgs != 0) |
+ { |
+ return DISP_E_BADPARAMCOUNT; |
+ } |
+ if (pVarResult) |
+ { |
+ pVarResult->vt = VT_BOOL; |
+ pVarResult->boolVal = CPluginClient::GetInstance()->GetPref(L"isFromSimpleAdblock", false) ? VARIANT_TRUE : VARIANT_FALSE; |
Eric
2015/03/27 12:51:45
The preference could be called "upgradingFrom".
|
+ } |
+ } |
+ break; |
default: |
return DISP_E_MEMBERNOTFOUND; |
break; |