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

Side by Side Diff: src/plugin/PluginTabBase.cpp

Issue 5171515343503360: Issue #41 - Bring method of determining IE version up to date (Closed)
Patch Set: reformatted Created July 26, 2014, 3:52 p.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 | « src/plugin/PluginClass.cpp ('k') | src/plugin/PluginWbPassThrough.cpp » ('j') | 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 2
3 #include "PluginClient.h" 3 #include "PluginClient.h"
4 #include "PluginSettings.h" 4 #include "PluginSettings.h"
5 #ifdef SUPPORT_CONFIG 5 #ifdef SUPPORT_CONFIG
6 #include "PluginConfig.h" 6 #include "PluginConfig.h"
7 #endif 7 #endif
8 #include "PluginTab.h" 8 #include "PluginTab.h"
9 #include "PluginDomTraverser.h" 9 #include "PluginDomTraverser.h"
10 #include "PluginClass.h" 10 #include "PluginClass.h"
11 11
12 #include "PluginTabBase.h" 12 #include "PluginTabBase.h"
13 #include "PluginUtil.h" 13 #include "PluginUtil.h"
14 #include "../shared/IE_version.h"
14 #include <dispex.h> 15 #include <dispex.h>
15 #include <Mshtmhst.h> 16 #include <Mshtmhst.h>
16 17
17 int CPluginTabBase::s_dictionaryVersion = 0; 18 int CPluginTabBase::s_dictionaryVersion = 0;
18 int CPluginTabBase::s_settingsVersion = 1; 19 int CPluginTabBase::s_settingsVersion = 1;
19 #ifdef SUPPORT_FILTER 20 #ifdef SUPPORT_FILTER
20 int CPluginTabBase::s_filterVersion = 0; 21 int CPluginTabBase::s_filterVersion = 0;
21 #endif 22 #endif
22 #ifdef SUPPORT_WHITELIST 23 #ifdef SUPPORT_WHITELIST
23 int CPluginTabBase::s_whitelistVersion = 0; 24 int CPluginTabBase::s_whitelistVersion = 0;
24 #endif 25 #endif
25 #ifdef SUPPORT_CONFIG 26 #ifdef SUPPORT_CONFIG
26 int CPluginTabBase::s_configVersion = 0; 27 int CPluginTabBase::s_configVersion = 0;
27 #endif 28 #endif
28 29
29 30
30 CPluginTabBase::CPluginTabBase(CPluginClass* plugin) 31 CPluginTabBase::CPluginTabBase(CPluginClass* plugin)
31 : m_plugin(plugin) 32 : m_plugin(plugin)
32 , m_isActivated(false) 33 , m_isActivated(false)
33 , m_continueThreadRunning(true) 34 , m_continueThreadRunning(true)
34 { 35 {
35 m_filter = std::auto_ptr<CPluginFilter>(new CPluginFilter()); 36 m_filter = std::auto_ptr<CPluginFilter>(new CPluginFilter());
36 m_filter->hideFiltersLoadedEvent = CreateEvent(NULL, true, false, NULL); 37 m_filter->hideFiltersLoadedEvent = CreateEvent(NULL, true, false, NULL);
37 38
38 CPluginClient* client = CPluginClient::GetInstance(); 39 CPluginClient* client = CPluginClient::GetInstance();
39 if (client->GetIEVersion() < 10) 40 if (AdblockPlus::IE::installed_major_version() < 10)
40 { 41 {
41 m_isActivated = true; 42 m_isActivated = true;
42 } 43 }
43 44
44 try 45 try
45 { 46 {
46 m_thread = std::thread(&CPluginTabBase::ThreadProc, this); 47 m_thread = std::thread(&CPluginTabBase::ThreadProc, this);
47 } 48 }
48 catch (const std::system_error& ex) 49 catch (const std::system_error& ex)
49 { 50 {
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 CPluginClient::LogPluginError(pluginError.GetErrorCode(), pluginError. GetErrorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), tr ue, pluginError.GetProcessId(), pluginError.GetThreadId()); 387 CPluginClient::LogPluginError(pluginError.GetErrorCode(), pluginError. GetErrorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), tr ue, pluginError.GetProcessId(), pluginError.GetThreadId());
387 } 388 }
388 389
389 // Non-hanging sleep 390 // Non-hanging sleep
390 Sleep(50); 391 Sleep(50);
391 } 392 }
392 393
393 tabLoopIteration++; 394 tabLoopIteration++;
394 } 395 }
395 } 396 }
OLDNEW
« no previous file with comments | « src/plugin/PluginClass.cpp ('k') | src/plugin/PluginWbPassThrough.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld