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

Delta Between Two Patch Sets: installer/src/custom-action/close_application.cpp

Issue 6003395731128320: Only take into account processes that have our plugin loaded (Closed)
Left Patch Set: Changes for x64 custom action and addressing comments Created March 27, 2014, 11:22 p.m.
Right 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:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « installer/installer.gyp ('k') | installer/src/installer-lib/process.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 /** 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 static const wchar_t * abp_module_names[] ;
27
28 public: 29 public:
29 IE_Closer() 30 IE_Closer()
30 : snapshot(), ie_closer( snapshot, ie_names, 1, abp_module_names, 2 ), engin e_closer( snapshot, engine_names, 1, NULL, 0 ) 31 : snapshot(), ie_closer( snapshot, ie_names, abp_module_names), engine_close r( snapshot, engine_names )
31 {} 32 {}
32 33
33 void refresh() 34 void refresh()
34 { 35 {
35 snapshot.refresh() ; 36 snapshot.refresh() ;
36 ie_closer.refresh() ; 37 ie_closer.refresh() ;
37 engine_closer.refresh() ; 38 engine_closer.refresh() ;
38 } 39 }
39 40
40 bool is_running() 41 bool is_running()
(...skipping 12 matching lines...) Expand all
53 if ( engine_closer.is_running() && ! engine_closer.shut_down() ) 54 if ( engine_closer.is_running() && ! engine_closer.shut_down() )
54 { 55 {
55 // Assert the engine is still running 56 // Assert the engine is still running
56 // 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.
57 return false ; 58 return false ;
58 } 59 }
59 return true ; 60 return true ;
60 } 61 }
61 } ; 62 } ;
62 63
63 const wchar_t * IE_Closer::ie_names[] = { L"IExplore.exe" } ;
64 const wchar_t * IE_Closer::engine_names[] = { L"AdblockPlusEngine.exe" } ;
65 const wchar_t * IE_Closer::abp_module_names[] = { L"AdblockPlus32.dll", L"Adbloc kPlus64.dll" } ;
66 64
67 //------------------------------------------------------- 65 //-------------------------------------------------------
68 // abp_close_ie 66 // abp_close_ie
69 //------------------------------------------------------- 67 //-------------------------------------------------------
70 /** 68 /**
71 * Exposed DLL entry point for custom action. 69 * Exposed DLL entry point for custom action.
72 * 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.
73 * 71 *
74 * 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.
75 * 73 *
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 return TRUE ; 451 return TRUE ;
454 } 452 }
455 453
456 /** 454 /**
457 * Windows_List 455 * Windows_List
458 */ 456 */
459 class Window_List { 457 class Window_List {
460 public: 458 public:
461 void enumerate_top_level(); 459 void enumerate_top_level();
462 }; 460 };
LEFTRIGHT

Powered by Google App Engine
This is Rietveld