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

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

Issue 11013110: Cleanup (Closed)
Left Patch Set: Created July 5, 2013, 3:28 a.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/DownloadSource.h ('k') | src/plugin/PluginChecksum.h » ('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 "Plugin.h" 3 #include "Plugin.h"
4 #ifdef _WIN64 4 #ifdef _WIN64
5 #include "../../build/x64/AdblockPlus_i.c" 5 #include "../../build/x64/AdblockPlus_i.c"
6 #else 6 #else
7 #include "../../build/ia32/AdblockPlus_i.c" 7 #include "../../build/ia32/AdblockPlus_i.c"
8 #endif 8 #endif
9 9
10 #include "PluginClass.h" 10 #include "PluginClass.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 { 105 {
106 return _Module.UnregisterServer(TRUE); 106 return _Module.UnregisterServer(TRUE);
107 } 107 }
108 108
109 void InitPlugin(bool isInstall) 109 void InitPlugin(bool isInstall)
110 { 110 {
111 CPluginSystem* system = CPluginSystem::GetInstance(); 111 CPluginSystem* system = CPluginSystem::GetInstance();
112 112
113 CPluginSettings* settings = CPluginSettings::GetInstance(); 113 CPluginSettings* settings = CPluginSettings::GetInstance();
114 114
115 settings->SetMainProcessId();
116
117 if (isInstall) 115 if (isInstall)
118 { 116 {
119 DEBUG_GENERAL( 117 DEBUG_GENERAL(
120 L"======================================================================== ========\nINSTALLER " + 118 L"======================================================================== ========\nINSTALLER " +
121 CString(IEPLUGIN_VERSION) + 119 CString(IEPLUGIN_VERSION) +
122 L"\n====================================================================== ==========") 120 L"\n====================================================================== ==========")
123 } 121 }
124 else 122 else
125 { 123 {
126 DEBUG_GENERAL( 124 DEBUG_GENERAL(
127 L"======================================================================== ========\nUPDATER " + 125 L"======================================================================== ========\nUPDATER " +
128 CString(IEPLUGIN_VERSION) + 126 CString(IEPLUGIN_VERSION) +
129 L"\n====================================================================== ==========") 127 L"\n====================================================================== ==========")
130 } 128 }
131
132 // Create default filters
133 #ifdef SUPPORT_FILTER
134 // DEBUG_GENERAL(L"*** Generating default filters")
135 // CPluginFilter::CreateFilters();
136 #endif
137
138 HKEY hKey = NULL;
139 DWORD dwDisposition = 0;
140
141 DWORD dwResult = NULL;
142 129
143 // Post async plugin error 130 // Post async plugin error
144 CPluginError pluginError; 131 CPluginError pluginError;
145 while (CPluginClientBase::PopFirstPluginError(pluginError)) 132 while (CPluginClientBase::PopFirstPluginError(pluginError))
146 { 133 {
147 CPluginClientBase::LogPluginError(pluginError.GetErrorCode(), pluginError.Ge tErrorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), true , pluginError.GetProcessId(), pluginError.GetThreadId()); 134 CPluginClientBase::LogPluginError(pluginError.GetErrorCode(), pluginError.Ge tErrorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), true , pluginError.GetProcessId(), pluginError.GetThreadId());
148 } 135 }
149 } 136 }
150 137
151 // Called from installer 138 // Called from installer
152 EXTERN_C void STDAPICALLTYPE OnInstall(MSIHANDLE hInstall, MSIHANDLE tmp) 139 EXTERN_C void STDAPICALLTYPE OnInstall(MSIHANDLE hInstall, MSIHANDLE tmp)
153 { 140 {
154 InitPlugin(true); 141 InitPlugin(true);
155 } 142 }
156 143
157 // Called from updater 144 // Called from updater
158 EXTERN_C void STDAPICALLTYPE OnUpdate(void) 145 EXTERN_C void STDAPICALLTYPE OnUpdate(void)
159 { 146 {
160 InitPlugin(false); 147 InitPlugin(false);
161 } 148 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld