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

Side by Side Diff: Shared/PluginDebug.cpp

Issue 9998007: Initial libadblockplus integration (Closed)
Patch Set: Created April 1, 2013, 9:55 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
OLDNEW
1 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 2
3 #include "PluginDebug.h" 3 #include "PluginDebug.h"
4 #include "PluginMutex.h" 4 #include "PluginMutex.h"
5 #include "PluginSettings.h" 5 #include "PluginSettings.h"
6 6
7 7
8 class CPluginDebugLock : public CPluginMutex 8 class CPluginDebugLock : public CPluginMutex
9 { 9 {
10 10
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 184 }
185 185
186 void CPluginDebug::DebugResultDomain(const CString& domain) 186 void CPluginDebug::DebugResultDomain(const CString& domain)
187 { 187 {
188 DebugResult(L"================================================================ ================================================================================ ==========================================="); 188 DebugResult(L"================================================================ ================================================================================ ===========================================");
189 DebugResult(domain); 189 DebugResult(domain);
190 DebugResult(L"================================================================ ================================================================================ ==========================================="); 190 DebugResult(L"================================================================ ================================================================================ ===========================================");
191 } 191 }
192 192
193 193
194 void CPluginDebug::DebugResultBlocking(const CString& type, const CString& src, const CString& filter, const CString& filterFile) 194 void CPluginDebug::DebugResultBlocking(const CString& type, const CString& src)
195 { 195 {
196 CString srcTrunc = src; 196 CString srcTrunc = src;
197 if (srcTrunc.GetLength() > 100) 197 if (srcTrunc.GetLength() > 100)
198 { 198 {
199 srcTrunc = src.Left(67) + L"..." + src.Right(30); 199 srcTrunc = src.Left(67) + L"..." + src.Right(30);
200 } 200 }
201 201
202 CString blocking; 202 CString blocking;
203 blocking.Format(L"%-8s %-100s Blocked %-20s - %s", type, srcTrunc, filterFi le, filter); 203 blocking.Format(L"%-8s %-100s Blocked %s", type, srcTrunc);
204 204
205 DebugResult(blocking); 205 DebugResult(blocking);
206 } 206 }
207 207
208 208
209 void CPluginDebug::DebugResultHiding(const CString& tag, const CString& src, con st CString& filter, const CString& filterFile) 209 void CPluginDebug::DebugResultHiding(const CString& tag, const CString& src, con st CString& filter)
210 { 210 {
211 CString srcTrunc = src; 211 CString srcTrunc = src;
212 if (srcTrunc.GetLength() > 100) 212 if (srcTrunc.GetLength() > 100)
213 { 213 {
214 srcTrunc = src.Left(67) + L"..." + src.Right(30); 214 srcTrunc = src.Left(67) + L"..." + src.Right(30);
215 } 215 }
216 216
217 CString blocking; 217 CString blocking;
218 blocking.Format(L"%-8s %-100s Hidden %-20s - %s", tag, srcTrunc, filterFil e, filter); 218 blocking.Format(L"%-8s %-100s Hidden - %s", tag, srcTrunc, filter);
219 219
220 DebugResult(blocking); 220 DebugResult(blocking);
221 } 221 }
222 222
223 223
224 void CPluginDebug::DebugResultClear() 224 void CPluginDebug::DebugResultClear()
225 { 225 {
226 CPluginDebugLock lock; 226 CPluginDebugLock lock;
227 if (lock.IsLocked()) 227 if (lock.IsLocked())
228 { 228 {
(...skipping 14 matching lines...) Expand all
243 srcTrunc = src.Left(67) + L"..." + src.Right(30); 243 srcTrunc = src.Left(67) + L"..." + src.Right(30);
244 } 244 }
245 245
246 CString blocking; 246 CString blocking;
247 blocking.Format(L"%-8s %-100s Ignored", type, srcTrunc); 247 blocking.Format(L"%-8s %-100s Ignored", type, srcTrunc);
248 248
249 DebugResult(blocking); 249 DebugResult(blocking);
250 } 250 }
251 251
252 #endif // ENABLE_DEBUG_RESULT_IGNORED 252 #endif // ENABLE_DEBUG_RESULT_IGNORED
OLDNEW

Powered by Google App Engine
This is Rietveld