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

Unified Diff: src/plugin/PluginUserSettings.cpp

Issue 6025347820683264: Issue 1106 - Enable Acceptable Ads by default for new installs and updates from versions < 1.2 (Closed)
Patch Set: Discriminate first run page title for install/update Created Aug. 1, 2014, 3:08 p.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 | « src/plugin/PluginClass.cpp ('k') | src/shared/Communication.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginUserSettings.cpp
===================================================================
--- a/src/plugin/PluginUserSettings.cpp
+++ b/src/plugin/PluginUserSettings.cpp
@@ -18,7 +18,8 @@
static const CString s_GetDocumentationLink = L"GetDocumentationLink";
static const CString s_IsAcceptableAdsEnabled = L"IsAcceptableAdsEnabled";
static const CString s_SetAcceptableAdsEnabled = L"SetAcceptableAdsEnabled";
-static const CString s_Methods[] = {s_GetMessage, s_GetLanguageCount, s_GetLanguageByIndex, s_GetLanguageTitleByIndex, s_SetLanguage, s_GetLanguage, s_GetWhitelistDomains, s_AddWhitelistDomain, s_RemoveWhitelistDomain, s_GetAppLocale, s_GetDocumentationLink, s_IsAcceptableAdsEnabled, s_SetAcceptableAdsEnabled};
+static const CString s_IsUpdate = L"IsUpdate";
+static const CString s_Methods[] = {s_GetMessage, s_GetLanguageCount, s_GetLanguageByIndex, s_GetLanguageTitleByIndex, s_SetLanguage, s_GetLanguage, s_GetWhitelistDomains, s_AddWhitelistDomain, s_RemoveWhitelistDomain, s_GetAppLocale, s_GetDocumentationLink, s_IsAcceptableAdsEnabled, s_SetAcceptableAdsEnabled, s_IsUpdate};
CPluginUserSettings::CPluginUserSettings()
{
@@ -353,6 +354,14 @@
client->RemoveSubscription(client->GetPref(L"subscriptions_exceptionsurl", L""));
}
}
+ else if (s_IsUpdate == method)
+ {
+ if (0 != pDispparams->cArgs)
+ return DISP_E_BADPARAMCOUNT;
+
+ pVarResult->vt = VT_BOOL;
+ pVarResult->boolVal = CPluginClient::GetInstance()->GetPref(L"displayUpdatePage", false);
+ }
else
return DISP_E_MEMBERNOTFOUND;
« no previous file with comments | « src/plugin/PluginClass.cpp ('k') | src/shared/Communication.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld