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

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

Issue 11013110: Cleanup (Closed)
Left Patch Set: More refactoring. Removing main thread, tab counting. Implementing SetPref and GetPref. Addressing … Created July 9, 2013, 12:59 p.m.
Right Patch Set: More beautification and addressing comments Created July 29, 2013, 12:13 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/PluginConfiguration.cpp ('k') | src/plugin/PluginFilter.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 #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 25 matching lines...) Expand all
36 CONSOLE(CT2A(text.GetString(), CP_UTF8)); 36 CONSOLE(CT2A(text.GetString(), CP_UTF8));
37 #endif 37 #endif
38 38
39 if (CPluginSettings::HasInstance()) 39 if (CPluginSettings::HasInstance())
40 { 40 {
41 #ifdef ENABLE_DEBUG_SPLIT_FILE 41 #ifdef ENABLE_DEBUG_SPLIT_FILE
42 CPluginSettings* settings = CPluginSettings::GetInstance(); 42 CPluginSettings* settings = CPluginSettings::GetInstance();
43 43
44 bool isWorkingThread = settings->IsWorkingThread(dwThreadId); 44 bool isWorkingThread = settings->IsWorkingThread(dwThreadId);
45 45
46 CString processor; 46 CString processor;
Wladimir Palant 2013/07/11 12:53:10 Aren't you leaving that variable uninitialized? Ho
Oleksandr 2013/07/22 00:48:16 Process ID isn't really a reliable identifier here
47 wchar_t tmp[10];
48 _itow_s(::GetCurrentProcessId(), tmp, 10);
49 if (isWorkingThread)
50 processor = L"tab" + CString(tmp) + L"_thread";
51 else
52 processor = L"tab" + CString(tmp) + L"_ui";
47 #else 53 #else
48 if (dwProcessId == 0) 54 if (dwProcessId == 0)
49 { 55 {
50 dwProcessId = ::GetCurrentProcessId(); 56 dwProcessId = ::GetCurrentProcessId();
51 } 57 }
52 if (dwThreadId == 0) 58 if (dwThreadId == 0)
53 { 59 {
54 dwThreadId = ::GetCurrentThreadId(); 60 dwThreadId = ::GetCurrentThreadId();
55 } 61 }
56 62
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 srcTrunc = src.Left(67) + L"..." + src.Right(30); 237 srcTrunc = src.Left(67) + L"..." + src.Right(30);
232 } 238 }
233 239
234 CString blocking; 240 CString blocking;
235 blocking.Format(L"Ignored %-12s %s %s", type, domain.IsEmpty()? L"-" : doma in, srcTrunc); 241 blocking.Format(L"Ignored %-12s %s %s", type, domain.IsEmpty()? L"-" : doma in, srcTrunc);
236 242
237 DebugResult(blocking); 243 DebugResult(blocking);
238 } 244 }
239 245
240 #endif // ENABLE_DEBUG_RESULT_IGNORED 246 #endif // ENABLE_DEBUG_RESULT_IGNORED
LEFTRIGHT

Powered by Google App Engine
This is Rietveld