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

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

Issue 10955040: Fix domain whitelisting and remove unused code (Closed)
Patch Set: Addressed all issues Created June 25, 2013, 2:19 p.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 "PluginClass.h" 3 #include "PluginClass.h"
4 #include "PluginSettings.h" 4 #include "PluginSettings.h"
5 #include "PluginSystem.h" 5 #include "PluginSystem.h"
6 #ifdef SUPPORT_FILTER 6 #ifdef SUPPORT_FILTER
7 #include "PluginFilter.h" 7 #include "PluginFilter.h"
8 #endif 8 #endif
9 #include "PluginMimeFilterClient.h" 9 #include "PluginMimeFilterClient.h"
10 #include "PluginClient.h" 10 #include "PluginClient.h"
(...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after
1765 CPluginTab* tab = GetTab(::GetCurrentThreadId()); 1765 CPluginTab* tab = GetTab(::GetCurrentThreadId());
1766 if (tab) 1766 if (tab)
1767 { 1767 {
1768 CPluginClient* client = CPluginClient::GetInstance(); 1768 CPluginClient* client = CPluginClient::GetInstance();
1769 1769
1770 #ifdef PRODUCT_ADBLOCKPLUS 1770 #ifdef PRODUCT_ADBLOCKPLUS
1771 if (!CPluginSettings::GetInstance()->IsPluginEnabled()) 1771 if (!CPluginSettings::GetInstance()->IsPluginEnabled())
1772 { 1772 {
1773 } 1773 }
1774 #ifdef SUPPORT_WHITELIST 1774 #ifdef SUPPORT_WHITELIST
1775 else if (client->IsUrlWhiteListed(url)) 1775 else if (client->IsWhitelistedUrl(ToUtf8String(std::wstring(url))))
1776 { 1776 {
1777 hIcon = GetIcon(ICON_PLUGIN_DISABLED); 1777 hIcon = GetIcon(ICON_PLUGIN_DISABLED);
1778 } 1778 }
1779 #endif // SUPPORT_WHITELIST 1779 #endif // SUPPORT_WHITELIST
1780 else 1780 else
1781 { 1781 {
1782 //Deativate adblock icon if adblock limit reached 1782 //Deativate adblock icon if adblock limit reached
1783 CPluginSettings* settings = CPluginSettings::GetInstance(); 1783 CPluginSettings* settings = CPluginSettings::GetInstance();
1784 if (!settings->GetPluginEnabled()) { 1784 if (!settings->GetPluginEnabled()) {
1785 hIcon = GetIcon(ICON_PLUGIN_DEACTIVATED); 1785 hIcon = GetIcon(ICON_PLUGIN_DEACTIVATED);
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
2192 } 2192 }
2193 } 2193 }
2194 } 2194 }
2195 2195
2196 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); 2196 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT);
2197 } 2197 }
2198 2198
2199 return hTabWnd; 2199 return hTabWnd;
2200 2200
2201 } 2201 }
OLDNEW

Powered by Google App Engine
This is Rietveld