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: Cosmetic code fixes. Addressing comments. Created July 18, 2014, 6:51 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
Index: src/plugin/PluginSettings.cpp
===================================================================
--- a/src/plugin/PluginSettings.cpp
+++ b/src/plugin/PluginSettings.cpp
@@ -319,10 +319,16 @@
CString CPluginSettings::GetSubscription()
{
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++)
+ {
+ if (subscription->url != aaUrl)
+ {
+ return CString(subscription->url.c_str());
+ }
+ }
+ return CString(L"");
}
CString CPluginSettings::GetAppLocale()
« src/engine/Main.cpp ('K') | « src/plugin/PluginClass.cpp ('k') | src/plugin/Resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld