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

Side by Side Diff: src/plugin/PluginSettings.cpp

Issue 5338025085108224: Support Acceptable Ads (Closed)
Patch Set: Created April 14, 2014, 7:01 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 2
3 #include <Wbemidl.h> 3 #include <Wbemidl.h>
4 #include <time.h> 4 #include <time.h>
5 #include "PluginSettings.h" 5 #include "PluginSettings.h"
6 #include "PluginClient.h" 6 #include "PluginClient.h"
7 #include "PluginSystem.h" 7 #include "PluginSystem.h"
8 #ifdef SUPPORT_FILTER 8 #ifdef SUPPORT_FILTER
9 #include "PluginFilter.h" 9 #include "PluginFilter.h"
10 #endif 10 #endif
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 return m_WindowsBuildNumber; 310 return m_WindowsBuildNumber;
311 } 311 }
312 312
313 void CPluginSettings::SetSubscription(const std::wstring& url) 313 void CPluginSettings::SetSubscription(const std::wstring& url)
314 { 314 {
315 CPluginClient::GetInstance()->SetSubscription(url); 315 CPluginClient::GetInstance()->SetSubscription(url);
316 RefreshWhitelist(); 316 RefreshWhitelist();
317 } 317 }
318 318
319 CString CPluginSettings::GetSubscription() 319 CString CPluginSettings::GetSubscription()
Eric 2014/06/25 14:34:15 FYI. The return type of this function has changed
320 { 320 {
321 std::vector<SubscriptionDescription> subscriptions = CPluginClient::GetInstanc e()->GetListedSubscriptions(); 321 std::vector<SubscriptionDescription> subscriptions = CPluginClient::GetInstanc e()->GetListedSubscriptions();
322 if (subscriptions.size() > 0) 322 std::wstring aaUrl = CPluginClient::GetInstance()->GetPref(L"subscriptions_exc eptionsurl", L"");
323 return CString(subscriptions.front().url.c_str()); 323
324 else 324 for (std::vector<SubscriptionDescription>::iterator subscription = subscriptio ns.begin(); subscription < subscriptions.end(); subscription ++)
Felix Dahlke 2014/06/30 17:24:04 "<" -> "!=" and "subscription ++" -> "subscription
325 return CString(L""); 325 {
326 if (subscription->url != aaUrl)
327 {
328 return CString(subscription->url.c_str());
329 }
330 }
331 return CString(L"");
326 } 332 }
327 333
328 CString CPluginSettings::GetAppLocale() 334 CString CPluginSettings::GetAppLocale()
329 { 335 {
330 return CPluginSystem::GetInstance()->GetBrowserLanguage(); 336 return CPluginSystem::GetInstance()->GetBrowserLanguage();
331 } 337 }
332 338
333 CString CPluginSettings::GetDocumentationLink() 339 CString CPluginSettings::GetDocumentationLink()
334 { 340 {
335 return CString(CPluginClient::GetInstance()->GetDocumentationLink().c_str()); 341 return CString(CPluginClient::GetInstance()->GetDocumentationLink().c_str());
336 } 342 }
337 343
338 344
339 345
340 #endif // SUPPORT_WHITELIST 346 #endif // SUPPORT_WHITELIST
OLDNEW

Powered by Google App Engine
This is Rietveld