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

Delta Between Two Patch Sets: src/plugin/PluginTabBase.cpp

Issue 29323611: Issue #1234, #2058 - Rewrite log facility, improving thread implementation
Left Patch Set: rebase to current tip Created Jan. 5, 2016, 2:52 p.m.
Right Patch Set: rebase only Created July 27, 2016, 9:11 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/plugin/PluginTabBase.h ('k') | test/plugin/ActiveQueueTest.cpp » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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-2016 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 *
(...skipping 15 matching lines...) Expand all
29 m_filter.hideFiltersLoadedEvent = CreateEvent(NULL, true, false, NULL); 29 m_filter.hideFiltersLoadedEvent = CreateEvent(NULL, true, false, NULL);
30 30
31 CPluginClient* client = CPluginClient::GetInstance(); 31 CPluginClient* client = CPluginClient::GetInstance();
32 m_traverser = new CPluginDomTraverser(static_cast<CPluginTab*>(this)); 32 m_traverser = new CPluginDomTraverser(static_cast<CPluginTab*>(this));
33 } 33 }
34 34
35 CPluginTab::~CPluginTab() 35 CPluginTab::~CPluginTab()
36 { 36 {
37 delete m_traverser; 37 delete m_traverser;
38 m_traverser = NULL; 38 m_traverser = NULL;
39 /**
40 * ABP only intercepts protocols "http:" and "https:".
41 * We can disable any domain used in those protocol with an appropriate whitelis t filter.
42 * Thus, the possibility to disable on a particular site depends only on the pro tocol.
43 */
44 bool CPluginTab::IsPossibleToDisableOnSite()
45 {
46 auto url = GetDocumentUrl();
47 return BeginsWith(url, L"http:") || BeginsWith(url, L"https:");
48 }
49
39 } 50 }
40 51
41 namespace 52 namespace
42 { 53 {
43 // Entry Point 54 // Entry Point
44 void FilterLoader(CPluginFilter* filter, const std::wstring& domain) 55 void FilterLoader(CPluginFilter* filter, const std::wstring& domain)
45 { 56 {
46 try 57 try
47 { 58 {
48 filter->LoadHideFilters(CPluginClient::GetInstance()->GetElementHidingSele ctors(domain)); 59 filter->LoadHideFilters(CPluginClient::GetInstance()->GetElementHidingSele ctors(domain));
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 { 354 {
344 if (domain.empty() || domain != m_cacheDomain) 355 if (domain.empty() || domain != m_cacheDomain)
345 { 356 {
346 m_cacheFrames.clear(); 357 m_cacheFrames.clear();
347 m_cacheDomain = domain; 358 m_cacheDomain = domain;
348 } 359 }
349 } 360 }
350 m_criticalSectionCache.Unlock(); 361 m_criticalSectionCache.Unlock();
351 } 362 }
352 363
LEFTRIGHT

Powered by Google App Engine
This is Rietveld