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

Unified Diff: src/plugin/PluginSettings.cpp

Issue 5338025085108224: Support Acceptable Ads (Closed)
Patch Set: Created April 14, 2014, 7:01 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/PluginSettings.cpp
===================================================================
--- a/src/plugin/PluginSettings.cpp
+++ b/src/plugin/PluginSettings.cpp
@@ -319,10 +319,16 @@
CString CPluginSettings::GetSubscription()
Eric 2014/06/25 14:34:15 FYI. The return type of this function has changed
{
std::vector<SubscriptionDescription> subscriptions = CPluginClient::GetInstance()->GetListedSubscriptions();
- if (subscriptions.size() > 0)
- return CString(subscriptions.front().url.c_str());
- else
- return CString(L"");
+ std::wstring aaUrl = CPluginClient::GetInstance()->GetPref(L"subscriptions_exceptionsurl", L"");
+
+ for (std::vector<SubscriptionDescription>::iterator subscription = subscriptions.begin(); subscription < subscriptions.end(); subscription ++)
Felix Dahlke 2014/06/30 17:24:04 "<" -> "!=" and "subscription ++" -> "subscription
+ {
+ if (subscription->url != aaUrl)
+ {
+ return CString(subscription->url.c_str());
+ }
+ }
+ return CString(L"");
}
CString CPluginSettings::GetAppLocale()

Powered by Google App Engine
This is Rietveld