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

Side by Side Diff: src/plugin/Plugin.cpp

Issue 4899473029332992: Noissue - Remove dead code (Closed)
Patch Set: Created March 17, 2015, 2:35 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 /* 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-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 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
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 #include "PluginStdAfx.h" 18 #include "PluginStdAfx.h"
19 19
20 #include "Plugin.h" 20 #include "Plugin.h"
21 #ifdef _WIN64 21 #ifdef _WIN64
22 #include "../../build/x64/AdblockPlus_i.c" 22 #include "../../build/x64/AdblockPlus_i.c"
23 #else 23 #else
24 #include "../../build/ia32/AdblockPlus_i.c" 24 #include "../../build/ia32/AdblockPlus_i.c"
25 #endif 25 #endif
26 26
27 #include "PluginClass.h" 27 #include "PluginClass.h"
28 #include "PluginClient.h" 28 #include "PluginMimeFilterClient.h"
29 #include "PluginSystem.h"
30 #include "PluginSettings.h" 29 #include "PluginSettings.h"
31 #include "PluginMimeFilterClient.h" 30 #include "PluginWbPassThrough.h"
Oleksandr 2015/03/19 04:39:32 I think this can be removed
32 #include "Msiquery.h"
33 #include "PluginFilter.h"
34
35 #include "../shared/Dictionary.h"
36 31
37 CComModule _Module; 32 CComModule _Module;
38 33
39 BEGIN_OBJECT_MAP(ObjectMap) 34 BEGIN_OBJECT_MAP(ObjectMap)
40 OBJECT_ENTRY(CLSID_PluginClass, CPluginClass) 35 OBJECT_ENTRY(CLSID_PluginClass, CPluginClass)
41 END_OBJECT_MAP() 36 END_OBJECT_MAP()
42 37
43 //Dll Entry Point 38 //Dll Entry Point
44 BOOL WINAPI DllMain(HINSTANCE hInstDll, DWORD fdwReason, LPVOID reserved) 39 BOOL WINAPI DllMain(HINSTANCE hInstDll, DWORD fdwReason, LPVOID reserved)
45 { 40 {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 STDAPI DllRegisterServer(void) 99 STDAPI DllRegisterServer(void)
105 { 100 {
106 return _Module.RegisterServer(TRUE); 101 return _Module.RegisterServer(TRUE);
107 } 102 }
108 103
109 STDAPI DllUnregisterServer(void) 104 STDAPI DllUnregisterServer(void)
110 { 105 {
111 return _Module.UnregisterServer(TRUE); 106 return _Module.UnregisterServer(TRUE);
112 } 107 }
113 108
114 void InitPlugin(bool isInstall)
115 {
116 CPluginSettings* settings = CPluginSettings::GetInstance();
117
118 if (isInstall)
119 {
120 DEBUG_GENERAL(
121 L"======================================================================== ========\n"
122 L"INSTALLER " IEPLUGIN_VERSION L"\n"
123 L"======================================================================== ========")
124 }
125 else
126 {
127 DEBUG_GENERAL(
128 L"======================================================================== ========\n"
129 L"UPDATER " IEPLUGIN_VERSION L"\n"
130 L"======================================================================== ========")
131 }
132
133 // Post async plugin error
134 CPluginError pluginError;
135 while (LogQueue::PopFirstPluginError(pluginError))
136 {
137 LogQueue::LogPluginError(pluginError.GetErrorCode(), pluginError.GetErrorId( ), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), true, pluginE rror.GetProcessId(), pluginError.GetThreadId());
138 }
139 }
140
141 // Called from installer
142 EXTERN_C void STDAPICALLTYPE OnInstall(MSIHANDLE hInstall, MSIHANDLE tmp)
143 {
144 InitPlugin(true);
145 }
146
147 // Called from updater
148 EXTERN_C void STDAPICALLTYPE OnUpdate(void)
149 {
150 InitPlugin(false);
151 }
OLDNEW

Powered by Google App Engine
This is Rietveld