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

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

Issue 5168444685156352: Issue 1201 - Enabling/disabling ABP everywhere applies only in the next opened tab (Closed)
Patch Set: Created March 27, 2015, 7:34 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/plugin/PluginClass.cpp » ('j') | src/plugin/PluginClass.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
(...skipping 13 matching lines...) Expand all
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 "PluginClient.h"
29 #include "PluginSystem.h" 29 #include "PluginSystem.h"
30 #include "PluginSettings.h" 30 #include "PluginSettings.h"
31 #include "PluginMimeFilterClient.h" 31 #include "PluginMimeFilterClient.h"
32 #include "Msiquery.h" 32 #include "Msiquery.h"
33 #include "PluginFilter.h" 33 #include "PluginFilter.h"
34 #include "PluginClientFactory.h"
34 35
35 #include "../shared/Dictionary.h" 36 #include "../shared/Dictionary.h"
36 37
37 CComModule _Module; 38 CComModule _Module;
38 39
39 BEGIN_OBJECT_MAP(ObjectMap) 40 BEGIN_OBJECT_MAP(ObjectMap)
40 OBJECT_ENTRY(CLSID_PluginClass, CPluginClass) 41 OBJECT_ENTRY(CLSID_PluginClass, CPluginClass)
41 END_OBJECT_MAP() 42 END_OBJECT_MAP()
42 43
43 //Dll Entry Point 44 //Dll Entry Point
(...skipping 27 matching lines...) Expand all
71 break; 72 break;
72 } 73 }
73 74
74 return TRUE; 75 return TRUE;
75 } 76 }
76 77
77 78
78 STDAPI DllCanUnloadNow(void) 79 STDAPI DllCanUnloadNow(void)
79 { 80 {
80 LONG count = _Module.GetLockCount(); 81 LONG count = _Module.GetLockCount();
81 if (_Module.GetLockCount() == 0) 82 if (_Module.GetLockCount() == 0)
Eric 2015/03/27 13:35:50 If I've read the ATL code right, this condition me
82 { 83 {
83 if (CPluginSettings::s_instance != NULL) 84 if (CPluginSettings::s_instance != NULL)
84 { 85 {
85 delete CPluginSettings::s_instance; 86 delete CPluginSettings::s_instance;
86 } 87 }
87 88
88 if (CPluginClass::s_mimeFilter != NULL) 89 CPluginClientFactory::ReleaseMimeFilterClientInstance();
Eric 2015/03/27 13:35:50 I've seen a crash recently during shutdown when 's
89 { 90
90 CPluginClass::s_mimeFilter->Unregister();
91 CPluginClass::s_mimeFilter = NULL;
92 }
93
94 _CrtDumpMemoryLeaks(); 91 _CrtDumpMemoryLeaks();
95 } 92 }
96 return (_Module.GetLockCount() == 0) ? S_OK : S_FALSE; 93 return (_Module.GetLockCount() == 0) ? S_OK : S_FALSE;
97 } 94 }
98 95
99 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) 96 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
100 { 97 {
101 return _Module.GetClassObject(rclsid, riid, ppv); 98 return _Module.GetClassObject(rclsid, riid, ppv);
102 } 99 }
103 100
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 EXTERN_C void STDAPICALLTYPE OnInstall(MSIHANDLE hInstall, MSIHANDLE tmp) 139 EXTERN_C void STDAPICALLTYPE OnInstall(MSIHANDLE hInstall, MSIHANDLE tmp)
143 { 140 {
144 InitPlugin(true); 141 InitPlugin(true);
145 } 142 }
146 143
147 // Called from updater 144 // Called from updater
148 EXTERN_C void STDAPICALLTYPE OnUpdate(void) 145 EXTERN_C void STDAPICALLTYPE OnUpdate(void)
149 { 146 {
150 InitPlugin(false); 147 InitPlugin(false);
151 } 148 }
OLDNEW
« no previous file with comments | « no previous file | src/plugin/PluginClass.cpp » ('j') | src/plugin/PluginClass.cpp » ('J')

Powered by Google App Engine
This is Rietveld