Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
2 #include "PluginSettings.h" | 2 #include "PluginSettings.h" |
3 #include "PluginSystem.h" | 3 #include "PluginSystem.h" |
4 #include "PluginFilter.h" | 4 #include "PluginFilter.h" |
5 #include "PluginClientFactory.h" | 5 #include "PluginClientFactory.h" |
6 #include "PluginMutex.h" | 6 #include "PluginMutex.h" |
7 #include "PluginClass.h" | 7 #include "PluginClass.h" |
8 | 8 |
9 #include "AdblockPlusClient.h" | 9 #include "AdblockPlusClient.h" |
10 | 10 |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
337 | 337 |
338 std::vector<SubscriptionDescription> CAdblockPlusClient::GetListedSubscriptions( ) | 338 std::vector<SubscriptionDescription> CAdblockPlusClient::GetListedSubscriptions( ) |
339 { | 339 { |
340 Communication::InputBuffer response; | 340 Communication::InputBuffer response; |
341 if (!CallEngine(Communication::PROC_LISTED_SUBSCRIPTIONS, response)) | 341 if (!CallEngine(Communication::PROC_LISTED_SUBSCRIPTIONS, response)) |
342 return std::vector<SubscriptionDescription>(); | 342 return std::vector<SubscriptionDescription>(); |
343 return ReadSubscriptions(response); | 343 return ReadSubscriptions(response); |
344 } | 344 } |
345 | 345 |
346 // Returns true if Acceptable Ads are enabled, false otherwise. | 346 // Returns true if Acceptable Ads are enabled, false otherwise. |
347 bool CAdblockPlusClient::AcceptableAdsStatus() | 347 bool CAdblockPlusClient::IsAcceptableAdsEnabled() |
Felix Dahlke
2014/06/30 17:24:04
How about IsAcceptableAdsEnabled()? That'd make th
| |
348 { | 348 { |
349 std::vector<SubscriptionDescription> subscriptions = GetListedSubscriptions(); | 349 std::vector<SubscriptionDescription> subscriptions = GetListedSubscriptions(); |
350 std::wstring aaUrl = GetPref(L"subscriptions_exceptionsurl", L""); | 350 std::wstring aaUrl = GetPref(L"subscriptions_exceptionsurl", L""); |
351 for (std::vector<SubscriptionDescription>::iterator subscription = subscriptio ns.begin(); subscription < subscriptions.end(); subscription ++) | 351 for (std::vector<SubscriptionDescription>::iterator subscription = subscriptio ns.begin(); subscription != subscriptions.end(); subscription++) |
Felix Dahlke
2014/06/30 17:24:04
!= for iterators, not <
Also no whitespace before
| |
352 { | 352 { |
353 if (subscription->url == aaUrl) | 353 if (subscription->url == aaUrl) |
354 { | 354 { |
355 return true; | 355 return true; |
356 } | 356 } |
357 } | 357 } |
358 return false; | 358 return false; |
359 } | 359 } |
360 | 360 |
361 void CAdblockPlusClient::SetSubscription(const std::wstring& url) | 361 void CAdblockPlusClient::SetSubscription(const std::wstring& url) |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
536 bool CAdblockPlusClient::TogglePluginEnabled() | 536 bool CAdblockPlusClient::TogglePluginEnabled() |
537 { | 537 { |
538 DEBUG_GENERAL("TogglePluginEnabled"); | 538 DEBUG_GENERAL("TogglePluginEnabled"); |
539 Communication::InputBuffer response; | 539 Communication::InputBuffer response; |
540 if (!CallEngine(Communication::PROC_TOGGLE_PLUGIN_ENABLED, response)) | 540 if (!CallEngine(Communication::PROC_TOGGLE_PLUGIN_ENABLED, response)) |
541 return false; | 541 return false; |
542 bool currentEnabledState; | 542 bool currentEnabledState; |
543 response >> currentEnabledState; | 543 response >> currentEnabledState; |
544 return currentEnabledState; | 544 return currentEnabledState; |
545 } | 545 } |
LEFT | RIGHT |