OLD | NEW |
1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
2 | 2 |
3 #include "PluginSettings.h" | 3 #include "PluginSettings.h" |
4 #include "PluginSystem.h" | 4 #include "PluginSystem.h" |
5 #include "PluginFilter.h" | 5 #include "PluginFilter.h" |
6 #include "PluginClientFactory.h" | 6 #include "PluginClientFactory.h" |
7 #include "PluginDictionary.h" | 7 #include "PluginDictionary.h" |
8 #include "PluginHttpRequest.h" | 8 #include "PluginHttpRequest.h" |
9 #include "PluginMutex.h" | 9 #include "PluginMutex.h" |
10 #include "PluginClass.h" | 10 #include "PluginClass.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 136 |
137 | 137 |
138 //in this method we read the filter that are in the persistent storage | 138 //in this method we read the filter that are in the persistent storage |
139 //then we read them and use these to create a new filterclass | 139 //then we read them and use these to create a new filterclass |
140 | 140 |
141 void CSimpleAdblockClient::ReadFilters() | 141 void CSimpleAdblockClient::ReadFilters() |
142 { | 142 { |
143 CPluginSettings* settings = CPluginSettings::GetInstance(); | 143 CPluginSettings* settings = CPluginSettings::GetInstance(); |
144 | 144 |
145 // Check existence of filter file | 145 // Check existence of filter file |
146 if (settings->IsMainProcess()) | 146 // if (settings->IsMainProcess()) |
147 { | 147 // { |
148 CPluginFilter::CreateFilters(); | 148 // CPluginFilter::CreateFilters(); |
149 } | 149 // } |
150 | 150 |
151 TFilterFileList filterFileNames; | 151 TFilterFileList filterFileNames; |
152 | 152 |
153 TFilterUrlList filters = settings->GetFilterUrlList(); | 153 TFilterUrlList filters = settings->GetFilterUrlList(); |
154 std::map<CString, CString> filterFileNameList = settings->GetFilterFileN
amesList(); | 154 std::map<CString, CString> filterFileNameList = settings->GetFilterFileN
amesList(); |
155 | 155 |
156 // Remember first entry in the map, is the filename, second is the versi
on of the filter | 156 // Remember first entry in the map, is the filename, second is the versi
on of the filter |
157 for (TFilterUrlList::iterator it = filters.begin(); it != filters.end();
++it) | 157 for (TFilterUrlList::iterator it = filters.begin(); it != filters.end();
++it) |
158 { | 158 { |
159 DEBUG_FILTER(L"Filter::ReadFilters - adding url:" + it->first) | 159 DEBUG_FILTER(L"Filter::ReadFilters - adding url:" + it->first) |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 BYTE version[50]; | 227 BYTE version[50]; |
228 cbData = 50; | 228 cbData = 50; |
229 status = RegQueryValueEx(hKey, L"Version", NULL, &type, (BYTE*)version,
&cbData); | 229 status = RegQueryValueEx(hKey, L"Version", NULL, &type, (BYTE*)version,
&cbData); |
230 if (status != 0) | 230 if (status != 0) |
231 { | 231 { |
232 return 0; | 232 return 0; |
233 } | 233 } |
234 RegCloseKey(hKey); | 234 RegCloseKey(hKey); |
235 return (int)(version[0] - 48); | 235 return (int)(version[0] - 48); |
236 } | 236 } |
OLD | NEW |