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

Unified Diff: src/plugin/PluginFilter.cpp

Issue 11062004: Don't use std::string in the plugin, convert when communicating with the engine (Closed)
Patch Set: Created June 27, 2013, 10:37 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
« no previous file with comments | « src/plugin/PluginFilter.h ('k') | src/plugin/PluginSettings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginFilter.cpp
===================================================================
--- a/src/plugin/PluginFilter.cpp
+++ b/src/plugin/PluginFilter.cpp
@@ -619,7 +619,7 @@
return false;
}
-bool CPluginFilter::LoadHideFilters(std::vector<std::string> filters)
+bool CPluginFilter::LoadHideFilters(std::vector<std::wstring> filters)
{
ClearFilters();
@@ -635,7 +635,7 @@
CriticalSection::Lock filterEngineLock(s_criticalSectionFilterMap);
{
- for (std::vector<std::string>::iterator it = filters.begin(); it < filters.end(); ++it)
+ for (std::vector<std::wstring>::iterator it = filters.begin(); it < filters.end(); ++it)
{
CString filter((*it).c_str());
Felix Dahlke 2013/06/27 10:53:06 As you can see, I didn't this. The UTF-8->UTF-16 c
// If the line is not commented out
@@ -706,15 +706,7 @@
}
CPluginClient* client = CPluginClient::GetInstance();
-
- std::string contentTypeString = CT2A(type, CP_UTF8);
-
- CT2CA srcMb(src, CP_UTF8);
- std::string url(srcMb);
-
- std::string domainMb = CT2CA(domain);
-
- if (client->Matches(url, contentTypeString, domainMb))
+ if (client->Matches(std::wstring(src), std::wstring(type), std::wstring(domain)))
{
if (addDebug)
{
« no previous file with comments | « src/plugin/PluginFilter.h ('k') | src/plugin/PluginSettings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld