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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 } | 306 } |
307 else if (s_RemoveWhitelistDomain == method) | 307 else if (s_RemoveWhitelistDomain == method) |
308 { | 308 { |
309 if (1 != pDispparams->cArgs) | 309 if (1 != pDispparams->cArgs) |
310 return DISP_E_BADPARAMCOUNT; | 310 return DISP_E_BADPARAMCOUNT; |
311 | 311 |
312 if (VT_BSTR != pDispparams->rgvarg[0].vt) | 312 if (VT_BSTR != pDispparams->rgvarg[0].vt) |
313 return DISP_E_TYPEMISMATCH; | 313 return DISP_E_TYPEMISMATCH; |
314 | 314 |
315 CComBSTR domain = pDispparams->rgvarg[0].bstrVal; | 315 CComBSTR domain = pDispparams->rgvarg[0].bstrVal; |
316 if (settings->IsWhiteListedDomain((BSTR)domain)) | 316 if (domain.Length()) |
317 { | 317 { |
318 settings->AddWhiteListedDomain((BSTR)domain); | 318 settings->RemoveWhiteListedDomain((BSTR)domain); |
319 CPluginClient::GetInstance()->ClearWhiteListCache(); | |
320 } | 319 } |
321 } | 320 } |
322 else | 321 else |
323 return DISP_E_MEMBERNOTFOUND; | 322 return DISP_E_MEMBERNOTFOUND; |
324 | 323 |
325 return S_OK; | 324 return S_OK; |
326 } | 325 } |
327 | 326 |
OLD | NEW |