| Index: src/plugin/PluginClientBase.cpp |
| =================================================================== |
| --- a/src/plugin/PluginClientBase.cpp |
| +++ b/src/plugin/PluginClientBase.cpp |
| @@ -166,15 +166,6 @@ |
| #ifdef SUPPORT_WHITELIST |
| -void CPluginClientBase::CacheWhiteListedUrl(const CString& url, bool isWhitelisted) |
| -{ |
| - m_criticalSectionWhitelist.Lock(); |
| - { |
| - m_cacheWhitelistedUrls[url] = isWhitelisted; |
| - } |
| - m_criticalSectionWhitelist.Unlock(); |
| -} |
| - |
| bool CPluginClientBase::IsUrlWhiteListed(const CString& url) |
| { |
| if (url.IsEmpty()) |
| @@ -182,49 +173,17 @@ |
| return false; |
| } |
| - bool isWhitelisted = false; |
| - bool isCached = false; |
| - |
| - m_criticalSectionWhitelist.Lock(); |
| + int pos = 0; |
| + CString http = url.Find('/',pos) >= 0 ? url.Tokenize(L"/", pos) : L""; |
|
Wladimir Palant
2013/06/17 09:33:56
I know that this isn't your code but that variable
Felix Dahlke
2013/06/17 11:19:01
Done.
|
| + CString domain = ExtractDomain(url); |
| + if (http == L"res:" || http == L"file:") |
| { |
| - std::map<CString,bool>::iterator it = m_cacheWhitelistedUrls.find(url); |
| - |
| - isCached = it != m_cacheWhitelistedUrls.end(); |
| - if (isCached) |
| - { |
| - isWhitelisted = it->second; |
| - } |
| - } |
| - m_criticalSectionWhitelist.Unlock(); |
| - |
| - if (!isCached) |
| - { |
| - int pos = 0; |
| - CString http = url.Find('/',pos) >= 0 ? url.Tokenize(L"/", pos) : L""; |
| - CString domain = ExtractDomain(url); |
| - if (http == L"res:" || http == L"file:") |
| - { |
| - isWhitelisted = true; |
| - } |
| - else |
| - { |
| - isWhitelisted = CPluginSettings::GetInstance()->IsWhiteListedDomain(domain); |
| - } |
| - |
| - CacheWhiteListedUrl(url, isWhitelisted); |
| + return true; |
| } |
| - return isWhitelisted; |
| + CPluginSettings* pluginSettings = CPluginSettings::GetInstance(); |
| + pluginSettings->RefreshWhitelist(); |
| + return pluginSettings->IsWhiteListedDomain(domain); |
|
Wladimir Palant
2013/06/17 09:33:56
Retrieving all exception domains from the engine j
Felix Dahlke
2013/06/17 11:19:01
Yes, I agree. I frankly didn't dare to change too
|
| } |
| -void CPluginClientBase::ClearWhiteListCache() |
| -{ |
| - m_criticalSectionWhitelist.Lock(); |
| - { |
| - m_cacheWhitelistedUrls.clear(); |
| - } |
| - m_criticalSectionWhitelist.Unlock(); |
| -} |
| - |
| - |
| #endif // SUPPORT_WHITELIST |