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

Unified Diff: src/plugin/PluginSettings.cpp

Issue 11013110: Cleanup (Closed)
Patch Set: SetPref/GetPref type safety. Comments addressed. Created July 22, 2013, 12: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/PluginSettings.cpp
===================================================================
--- a/src/plugin/PluginSettings.cpp
+++ b/src/plugin/PluginSettings.cpp
@@ -20,9 +20,9 @@
namespace
{
- std::wstring CreateDomainWhitelistingFilter(CString domain)
+ std::wstring CreateDomainWhitelistingFilter(const CString domain)
{
- return std::wstring(L"@@||" + domain + L"^$document");
+ return L"@@||" + domain + L"^$document";
}
}
@@ -66,8 +66,7 @@
CComAutoCriticalSection CPluginSettings::s_criticalSectionLocal;
-CPluginSettings::CPluginSettings() :
- m_settingsVersion("1"), m_dwWorkingThreadId(0), m_isPluginEnabledTab(true)
+CPluginSettings::CPluginSettings() : m_dwWorkingThreadId(0), m_isPluginEnabledTab(true)
{
s_instance = NULL;
@@ -246,13 +245,12 @@
bool CPluginSettings::GetStatusBarAsked()
{
- std::wstring res = CPluginClient::GetInstance()->GetPref(L"statusbarasked");
- return res == L"true";
+ return CPluginClient::GetInstance()->GetPref(L"statusbarasked", false);
}
void CPluginSettings::SetStatusBarAsked()
{
- CPluginClient::GetInstance()->SetPref(L"statusbarasked", L"true");
+ CPluginClient::GetInstance()->SetPref(L"statusbarasked", true);
}

Powered by Google App Engine
This is Rietveld