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

Unified Diff: src/plugin/PluginClientBase.cpp

Issue 10955040: Fix domain whitelisting and remove unused code (Closed)
Patch Set: Created June 25, 2013, 9:42 a.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/PluginClientBase.cpp
===================================================================
--- a/src/plugin/PluginClientBase.cpp
+++ b/src/plugin/PluginClientBase.cpp
@@ -155,32 +155,3 @@
return hasError;
}
-
-// ============================================================================
-// Whitelisting
-// ============================================================================
-
-#ifdef SUPPORT_WHITELIST
-
-bool CPluginClientBase::IsUrlWhiteListed(const CString& url)
-{
- if (url.IsEmpty())
- {
- return false;
- }
-
- int pos = 0;
- CString scheme = url.Find('/',pos) >= 0 ? url.Tokenize(L"/", pos) : L"";
- CString domain = ExtractDomain(url);
- if (scheme == L"res:" || scheme == L"file:")
Felix Dahlke 2013/06/25 09:46:58 Do you think excluding some schemes is still neces
Wladimir Palant 2013/06/25 12:00:40 Yes, leaving it to Matches() is more consistent to
Oleksandr 2013/06/25 12:13:58 We should do as little as possible with these. Esp
- {
- return true;
- }
-
- // TODO: Caching whitelist entries in PluginSettings is redundant and wasteful. We should have an engine call for IsWhitelistedDomain.
- CPluginSettings* pluginSettings = CPluginSettings::GetInstance();
- pluginSettings->RefreshWhitelist();
- return pluginSettings->IsWhiteListedDomain(domain);
-}
-
-#endif // SUPPORT_WHITELIST

Powered by Google App Engine
This is Rietveld