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

Side by Side Diff: Shared/PluginUserSettings.cpp

Issue 9998007: Initial libadblockplus integration (Closed)
Patch Set: Subscription changes and filter management cleanup Created April 5, 2013, 1:56 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Shared/PluginSettings.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "PluginDictionary.h" 7 #include "PluginDictionary.h"
8 8
9 static const CString s_GetMessage = L"GetMessage"; 9 static const CString s_GetMessage = L"GetMessage";
10 static const CString s_GetLanguageCount = L"GetLanguageCount"; 10 static const CString s_GetLanguageCount = L"GetLanguageCount";
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 if (1 != pDispparams->cArgs) 249 if (1 != pDispparams->cArgs)
250 return DISP_E_BADPARAMCOUNT; 250 return DISP_E_BADPARAMCOUNT;
251 251
252 if (VT_BSTR != pDispparams->rgvarg[0].vt) 252 if (VT_BSTR != pDispparams->rgvarg[0].vt)
253 return DISP_E_TYPEMISMATCH; 253 return DISP_E_TYPEMISMATCH;
254 254
255 CComBSTR language = pDispparams->rgvarg[0].bstrVal; 255 CComBSTR language = pDispparams->rgvarg[0].bstrVal;
256 256
257 settings->SetString(SETTING_LANGUAGE, (BSTR)language); 257 settings->SetString(SETTING_LANGUAGE, (BSTR)language);
258 settings->Write(); 258 settings->Write();
259 settings->CheckFilterAndDownload(); 259 settings->SetSubscription((BSTR)language);
260 } 260 }
261 else if (s_GetLanguage == method) 261 else if (s_GetLanguage == method)
262 { 262 {
263 if (pDispparams->cArgs) 263 if (pDispparams->cArgs)
264 return DISP_E_BADPARAMCOUNT; 264 return DISP_E_BADPARAMCOUNT;
265 265
266 if (pVarResult) 266 if (pVarResult)
267 { 267 {
268 CString language = settings->GetString(SETTING_LANGUAGE); 268 CString language = settings->GetString(SETTING_LANGUAGE);
269 269
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 settings->AddWhiteListedDomain((BSTR)domain, 3, true); 324 settings->AddWhiteListedDomain((BSTR)domain, 3, true);
325 CPluginClient::GetInstance()->ClearWhiteListCache(); 325 CPluginClient::GetInstance()->ClearWhiteListCache();
326 } 326 }
327 } 327 }
328 else 328 else
329 return DISP_E_MEMBERNOTFOUND; 329 return DISP_E_MEMBERNOTFOUND;
330 330
331 return S_OK; 331 return S_OK;
332 } 332 }
333 333
OLDNEW
« no previous file with comments | « Shared/PluginSettings.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld