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

Side by Side Diff: installer/src/custom-action/close_application.cpp

Issue 6003395731128320: Only take into account processes that have our plugin loaded (Closed)
Patch Set: Simplify Process_Closer constructor Created March 31, 2014, 8:31 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 | « installer/installer.gyp ('k') | installer/src/installer-lib/process.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * \file close_application.cpp 2 * \file close_application.cpp
3 */ 3 */
4 4
5 #include <algorithm> 5 #include <algorithm>
6 6
7 #include "session.h" 7 #include "session.h"
8 #include "property.h" 8 #include "property.h"
9 #include "database.h" 9 #include "database.h"
10 #include "process.h" 10 #include "process.h"
11 #include "interaction.h" 11 #include "interaction.h"
12 #include "custom-i18n.h" 12 #include "custom-i18n.h"
13 13
14 const wchar_t * ie_names[] = { L"IExplore.exe" } ;
15 const wchar_t * engine_names[] = { L"AdblockPlusEngine.exe" } ;
16 const wchar_t * abp_module_names[] = { L"AdblockPlus32.dll", L"AdblockPlus64.dll " } ;
17
18
14 //------------------------------------------------------- 19 //-------------------------------------------------------
15 //------------------------------------------------------- 20 //-------------------------------------------------------
16 class IE_Closer 21 class IE_Closer
17 { 22 {
18 Snapshot snapshot ; 23 Snapshot snapshot ;
19 24
20 Process_Closer ie_closer ; 25 Process_Closer ie_closer ;
21 26
22 Process_Closer engine_closer ; 27 Process_Closer engine_closer ;
23 28
24 static const wchar_t * ie_names[] ;
25 static const wchar_t * engine_names[] ;
26
27 public: 29 public:
28 IE_Closer() 30 IE_Closer()
29 : snapshot(), ie_closer( snapshot, ie_names, 1 ), engine_closer( snapshot, e ngine_names, 1 ) 31 : snapshot(), ie_closer( snapshot, ie_names, abp_module_names), engine_close r( snapshot, engine_names )
30 {} 32 {}
31 33
32 void refresh() 34 void refresh()
33 { 35 {
34 snapshot.refresh() ; 36 snapshot.refresh() ;
35 ie_closer.refresh() ; 37 ie_closer.refresh() ;
36 engine_closer.refresh() ; 38 engine_closer.refresh() ;
37 } 39 }
38 40
39 bool is_running() 41 bool is_running()
(...skipping 12 matching lines...) Expand all
52 if ( engine_closer.is_running() && ! engine_closer.shut_down() ) 54 if ( engine_closer.is_running() && ! engine_closer.shut_down() )
53 { 55 {
54 // Assert the engine is still running 56 // Assert the engine is still running
55 // This is after IE has shut down itself and after we've tried to shut dow n the engine. Whatever. 57 // This is after IE has shut down itself and after we've tried to shut dow n the engine. Whatever.
56 return false ; 58 return false ;
57 } 59 }
58 return true ; 60 return true ;
59 } 61 }
60 } ; 62 } ;
61 63
62 const wchar_t * IE_Closer::ie_names[] = { L"IExplore.exe" } ;
63 const wchar_t * IE_Closer::engine_names[] = { L"AdblockPlusEngine.exe" } ;
64 64
65 //------------------------------------------------------- 65 //-------------------------------------------------------
66 // abp_close_ie 66 // abp_close_ie
67 //------------------------------------------------------- 67 //-------------------------------------------------------
68 /** 68 /**
69 * Exposed DLL entry point for custom action. 69 * Exposed DLL entry point for custom action.
70 * The function signature matches the calling convention used by Windows Install er. 70 * The function signature matches the calling convention used by Windows Install er.
71 * 71 *
72 * This function supports four policy stances with respect to a running IE proce ss. 72 * This function supports four policy stances with respect to a running IE proce ss.
73 * 73 *
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 return TRUE ; 451 return TRUE ;
452 } 452 }
453 453
454 /** 454 /**
455 * Windows_List 455 * Windows_List
456 */ 456 */
457 class Window_List { 457 class Window_List {
458 public: 458 public:
459 void enumerate_top_level(); 459 void enumerate_top_level();
460 }; 460 };
OLDNEW
« no previous file with comments | « installer/installer.gyp ('k') | installer/src/installer-lib/process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld