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

Side by Side Diff: src/engine/Main.cpp

Issue 29355411: Issue 4486 - fix document URL parameter value when calling GetWhitelistingFilter (Closed)
Patch Set: Created Sept. 30, 2016, 9:23 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 | « no previous file | 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-2016 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
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 return match->GetProperty("text")->AsString(); 102 return match->GetProperty("text")->AsString();
103 } 103 }
104 return ""; 104 return "";
105 }; 105 };
106 106
107 std::string GetWhitelistingFilter(const std::string& urlArg, 107 std::string GetWhitelistingFilter(const std::string& urlArg,
108 const std::vector<std::string>& frameHierarchy, AdblockPlus::FilterEngine::C ontentType type) 108 const std::vector<std::string>& frameHierarchy, AdblockPlus::FilterEngine::C ontentType type)
109 { 109 {
110 if (frameHierarchy.empty()) 110 if (frameHierarchy.empty())
111 { 111 {
112 return GetWhitelistingFilter(urlArg, "", type); 112 return GetWhitelistingFilter(urlArg, urlArg, type);
113 } 113 }
114 auto frameIterator = frameHierarchy.begin(); 114 auto frameIterator = frameHierarchy.begin();
115 std::string url = urlArg; 115 std::string url = urlArg;
116 do 116 do
117 { 117 {
118 std::string parentUrl = *frameIterator++; 118 std::string parentUrl = *frameIterator++;
119 auto filterText = GetWhitelistingFilter(url, parentUrl, type); 119 auto filterText = GetWhitelistingFilter(url, parentUrl, type);
120 if (!filterText.empty()) 120 if (!filterText.empty())
121 { 121 {
122 return filterText; 122 return filterText;
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 }); 756 });
757 757
758 int retValue = _AtlModule.WinMain(cmdShow); 758 int retValue = _AtlModule.WinMain(cmdShow);
759 if (communicationThread.joinable()) 759 if (communicationThread.joinable())
760 { 760 {
761 communicationThread.join(); 761 communicationThread.join();
762 } 762 }
763 763
764 return retValue; 764 return retValue;
765 } 765 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld