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

Unified Diff: src/plugin/PluginClass.cpp

Issue 5109791353470976: Issue #1234 - standardize some string conversions (Closed)
Patch Set: Created Aug. 6, 2014, 8:19 p.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/AdblockPlusDomTraverser.cpp ('k') | src/plugin/PluginFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginClass.cpp
===================================================================
--- a/src/plugin/PluginClass.cpp
+++ b/src/plugin/PluginClass.cpp
@@ -1342,13 +1342,13 @@
{
CPluginSettings* settings = CPluginSettings::GetInstance();
CString urlString = GetTab()->GetDocumentUrl();
- if (client->IsWhitelistedUrl(std::wstring(urlString)))
+ if (client->IsWhitelistedUrl(to_wstring(urlString)))
{
- settings->RemoveWhiteListedDomain(client->GetHostFromUrl(urlString.GetString()).c_str());
+ settings->RemoveWhiteListedDomain(to_CString(client->GetHostFromUrl(to_wstring(urlString))));
}
else
{
- settings->AddWhiteListedDomain(client->GetHostFromUrl(urlString.GetString()).c_str());
+ settings->AddWhiteListedDomain(to_CString(client->GetHostFromUrl(to_wstring(urlString))));
}
GetBrowser()->Refresh();
}
@@ -1390,8 +1390,8 @@
{
ctext = dictionary->Lookup("menu", "menu-disable-on-site");
// Is domain in white list?
- ReplaceString(ctext, L"?1?", client->GetHostFromUrl(url.GetString()));
- if (client->IsWhitelistedUrl(std::wstring(GetTab()->GetDocumentUrl())))
+ ReplaceString(ctext, L"?1?", client->GetHostFromUrl(to_wstring(url)));
+ if (client->IsWhitelistedUrl(to_wstring(GetTab()->GetDocumentUrl())))
{
fmii.fState = MFS_CHECKED | MFS_ENABLED;
}
@@ -1618,7 +1618,7 @@
if (!CPluginSettings::GetInstance()->IsPluginEnabled())
{
}
- else if (client->IsWhitelistedUrl(std::wstring(url)))
+ else if (client->IsWhitelistedUrl(to_wstring(url)))
{
hIcon = GetIcon(ICON_PLUGIN_DISABLED);
}
« no previous file with comments | « src/plugin/AdblockPlusDomTraverser.cpp ('k') | src/plugin/PluginFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld