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

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

Issue 5994126579335168: Noissue - Remove a dead inheritance and some dead code (Closed)
Patch Set: Remove comment Created Feb. 27, 2015, 4:47 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/PluginTabBase.h ('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 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 #include "PluginStdAfx.h" 18 #include "PluginStdAfx.h"
19 19
20 #include "PluginClient.h" 20 #include "PluginClient.h"
21 #include "PluginSettings.h" 21 #include "PluginSettings.h"
22 #include "AdblockPlusDomTraverser.h" 22 #include "AdblockPlusDomTraverser.h"
23 #include "PluginClass.h" 23 #include "PluginClass.h"
24 #include "PluginTabBase.h" 24 #include "PluginTabBase.h"
25 #include "PluginUtil.h" 25 #include "PluginUtil.h"
26 #include "../shared/IE_version.h" 26 #include "../shared/IE_version.h"
27 #include <dispex.h> 27 #include <dispex.h>
28 #include <Mshtmhst.h> 28 #include <Mshtmhst.h>
29 29
30 int CPluginTabBase::s_dictionaryVersion = 0;
31 int CPluginTabBase::s_settingsVersion = 1;
32 int CPluginTabBase::s_filterVersion = 0;
33 int CPluginTabBase::s_whitelistVersion = 0;
34
35 CPluginTabBase::CPluginTabBase(CPluginClass* plugin) 30 CPluginTabBase::CPluginTabBase(CPluginClass* plugin)
36 : m_plugin(plugin) 31 : m_plugin(plugin)
37 , m_isActivated(false) 32 , m_isActivated(false)
38 , m_continueThreadRunning(true) 33 , m_continueThreadRunning(true)
39 { 34 {
40 m_filter = std::auto_ptr<CPluginFilter>(new CPluginFilter()); 35 m_filter = std::auto_ptr<CPluginFilter>(new CPluginFilter());
41 m_filter->hideFiltersLoadedEvent = CreateEvent(NULL, true, false, NULL); 36 m_filter->hideFiltersLoadedEvent = CreateEvent(NULL, true, false, NULL);
42 37
43 CPluginClient* client = CPluginClient::GetInstance(); 38 CPluginClient* client = CPluginClient::GetInstance();
44 if (AdblockPlus::IE::InstalledMajorVersion() < 10) 39 if (AdblockPlus::IE::InstalledMajorVersion() < 10)
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 while (this->m_continueThreadRunning) 335 while (this->m_continueThreadRunning)
341 { 336 {
342 #ifdef ENABLE_DEBUG_THREAD 337 #ifdef ENABLE_DEBUG_THREAD
343 CStringA sTabLoopIteration; 338 CStringA sTabLoopIteration;
344 sTabLoopIteration.Format("%u", tabLoopIteration); 339 sTabLoopIteration.Format("%u", tabLoopIteration);
345 340
346 DEBUG_THREAD("-------------------------------------------------------------- ------------------") 341 DEBUG_THREAD("-------------------------------------------------------------- ------------------")
347 DEBUG_THREAD("Loop iteration " + sTabLoopIteration); 342 DEBUG_THREAD("Loop iteration " + sTabLoopIteration);
348 DEBUG_THREAD("-------------------------------------------------------------- ------------------") 343 DEBUG_THREAD("-------------------------------------------------------------- ------------------")
349 #endif 344 #endif
350 if (this->m_isActivated) 345 this->m_isActivated = false;
351 {
352 bool isChanged = false;
353
354 if (isChanged)
355 {
356 this->m_plugin->UpdateStatusBar();
357 }
358
359 this->m_isActivated = false;
360 }
361 346
362 // -------------------------------------------------------------------- 347 // --------------------------------------------------------------------
363 // End loop 348 // End loop
364 // -------------------------------------------------------------------- 349 // --------------------------------------------------------------------
365 350
366 // Sleep loop 351 // Sleep loop
367 while (this->m_continueThreadRunning && !this->m_isActivated && (++loopCou nt % (TIMER_THREAD_SLEEP_TAB_LOOP / 50)) != 0) 352 while (this->m_continueThreadRunning && !this->m_isActivated && (++loopCou nt % (TIMER_THREAD_SLEEP_TAB_LOOP / 50)) != 0)
368 { 353 {
369 // Post async plugin error 354 // Post async plugin error
370 CPluginError pluginError; 355 CPluginError pluginError;
371 if (CPluginClient::PopFirstPluginError(pluginError)) 356 if (LogQueue::PopFirstPluginError(pluginError))
372 { 357 {
373 CPluginClient::LogPluginError(pluginError.GetErrorCode(), pluginError. GetErrorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), tr ue, pluginError.GetProcessId(), pluginError.GetThreadId()); 358 LogQueue::LogPluginError(pluginError.GetErrorCode(), pluginError.GetEr rorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), true, p luginError.GetProcessId(), pluginError.GetThreadId());
374 } 359 }
375 360
376 // Non-hanging sleep 361 // Non-hanging sleep
377 Sleep(50); 362 Sleep(50);
378 } 363 }
379 364
380 tabLoopIteration++; 365 tabLoopIteration++;
381 } 366 }
382 } 367 }
OLDNEW
« no previous file with comments | « src/plugin/PluginTabBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld