| OLD | NEW |
| 1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
| 2 #include "PluginUserSettings.h" | 2 #include "PluginUserSettings.h" |
| 3 #include <algorithm> | 3 #include <algorithm> |
| 4 #include "PluginSettings.h" | 4 #include "PluginSettings.h" |
| 5 #include "PluginClient.h" | 5 #include "PluginClient.h" |
| 6 #include "PluginIniFileW.h" | 6 #include "PluginIniFileW.h" |
| 7 | 7 |
| 8 static const CString s_GetMessage = L"GetMessage"; | 8 static const CString s_GetMessage = L"GetMessage"; |
| 9 static const CString s_GetLanguageCount = L"GetLanguageCount"; | 9 static const CString s_GetLanguageCount = L"GetLanguageCount"; |
| 10 static const CString s_GetLanguageByIndex = L"GetLanguageByIndex"; | 10 static const CString s_GetLanguageByIndex = L"GetLanguageByIndex"; |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 pVarResult->bstrVal = SysAllocString(url); | 268 pVarResult->bstrVal = SysAllocString(url); |
| 269 } | 269 } |
| 270 } | 270 } |
| 271 else if (s_GetWhitelistDomains == method) | 271 else if (s_GetWhitelistDomains == method) |
| 272 { | 272 { |
| 273 if (pDispparams->cArgs) | 273 if (pDispparams->cArgs) |
| 274 return DISP_E_BADPARAMCOUNT; | 274 return DISP_E_BADPARAMCOUNT; |
| 275 | 275 |
| 276 if (pVarResult) | 276 if (pVarResult) |
| 277 { | 277 { |
| 278 std::vector<std::string> whiteList = settings->GetWhiteListedDomainList(); | 278 std::vector<std::wstring> whiteList = settings->GetWhiteListedDomainList()
; |
| 279 CString sWhiteList; | 279 CString sWhiteList; |
| 280 for (size_t i = 0; i < whiteList.size(); i++) | 280 for (size_t i = 0; i < whiteList.size(); i++) |
| 281 { | 281 { |
| 282 if (!sWhiteList.IsEmpty()) | 282 if (!sWhiteList.IsEmpty()) |
| 283 { | 283 { |
| 284 sWhiteList += ','; | 284 sWhiteList += ','; |
| 285 } | 285 } |
| 286 sWhiteList += CString(CA2W(whiteList[i].c_str(), CP_UTF8)); | 286 sWhiteList += CString(whiteList[i].c_str()); |
| 287 } | 287 } |
| 288 | 288 |
| 289 pVarResult->vt = VT_BSTR; | 289 pVarResult->vt = VT_BSTR; |
| 290 pVarResult->bstrVal = SysAllocString(sWhiteList); | 290 pVarResult->bstrVal = SysAllocString(sWhiteList); |
| 291 } | 291 } |
| 292 } | 292 } |
| 293 else if (s_AddWhitelistDomain == method) | 293 else if (s_AddWhitelistDomain == method) |
| 294 { | 294 { |
| 295 if (1 != pDispparams->cArgs) | 295 if (1 != pDispparams->cArgs) |
| 296 return DISP_E_BADPARAMCOUNT; | 296 return DISP_E_BADPARAMCOUNT; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 317 { | 317 { |
| 318 settings->RemoveWhiteListedDomain((BSTR)domain); | 318 settings->RemoveWhiteListedDomain((BSTR)domain); |
| 319 } | 319 } |
| 320 } | 320 } |
| 321 else | 321 else |
| 322 return DISP_E_MEMBERNOTFOUND; | 322 return DISP_E_MEMBERNOTFOUND; |
| 323 | 323 |
| 324 return S_OK; | 324 return S_OK; |
| 325 } | 325 } |
| 326 | 326 |
| OLD | NEW |