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

Delta Between Two Patch Sets: src/engine/main.cpp

Issue 10955040: Fix domain whitelisting and remove unused code (Closed)
Left Patch Set: Created June 25, 2013, 9:42 a.m.
Right Patch Set: Addressed all issues Created June 25, 2013, 2:19 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 | « no previous file | src/plugin/AdblockPlusClient.h » ('j') | src/plugin/AdblockPlusClient.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #include <AdblockPlus.h> 1 #include <AdblockPlus.h>
2 #include <functional> 2 #include <functional>
3 #include <vector> 3 #include <vector>
4 #include <Windows.h> 4 #include <Windows.h>
5 5
6 #include "../shared/AutoHandle.h" 6 #include "../shared/AutoHandle.h"
7 #include "../shared/Communication.h" 7 #include "../shared/Communication.h"
8 #include "../shared/Dictionary.h" 8 #include "../shared/Dictionary.h"
9 #include "../shared/Utils.h" 9 #include "../shared/Utils.h"
10 #include "../shared/Version.h" 10 #include "../shared/Version.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 } 118 }
119 119
120 WriteStrings(response, domains); 120 WriteStrings(response, domains);
121 break; 121 break;
122 } 122 }
123 case Communication::PROC_IS_WHITELISTED_URL: 123 case Communication::PROC_IS_WHITELISTED_URL:
124 { 124 {
125 std::string url; 125 std::string url;
126 request >> url; 126 request >> url;
127 AdblockPlus::FilterPtr match = filterEngine->Matches(url, "DOCUMENT", "" ); 127 AdblockPlus::FilterPtr match = filterEngine->Matches(url, "DOCUMENT", ur l);
128 response << (match && match->GetType() == AdblockPlus::Filter::TYPE_EXCE PTION); 128 response << (match && match->GetType() == AdblockPlus::Filter::TYPE_EXCE PTION);
129 break; 129 break;
130 } 130 }
131 case Communication::PROC_ADD_FILTER: 131 case Communication::PROC_ADD_FILTER:
132 { 132 {
133 std::string text; 133 std::string text;
134 request >> text; 134 request >> text;
135 135
136 filterEngine->GetFilter(text)->AddToList(); 136 filterEngine->GetFilter(text)->AddToList();
137 break; 137 break;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 247 }
248 catch (std::runtime_error e) 248 catch (std::runtime_error e)
249 { 249 {
250 DebugException(e); 250 DebugException(e);
251 return 1; 251 return 1;
252 } 252 }
253 } 253 }
254 254
255 return 0; 255 return 0;
256 } 256 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld