Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: sandbox/win/src/broker_services.h

Issue 319573006: Add sandbox support for process memory limits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ready for review Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SANDBOX_WIN_SRC_BROKER_SERVICES_H_ 5 #ifndef SANDBOX_WIN_SRC_BROKER_SERVICES_H_
6 #define SANDBOX_WIN_SRC_BROKER_SERVICES_H_ 6 #define SANDBOX_WIN_SRC_BROKER_SERVICES_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 const wchar_t* name) OVERRIDE; 56 const wchar_t* name) OVERRIDE;
57 virtual ResultCode UninstallAppContainer(const wchar_t* sid) OVERRIDE; 57 virtual ResultCode UninstallAppContainer(const wchar_t* sid) OVERRIDE;
58 58
59 // Checks if the supplied process ID matches one of the broker's active 59 // Checks if the supplied process ID matches one of the broker's active
60 // target processes 60 // target processes
61 // Returns: 61 // Returns:
62 // true if there is an active target process for this ID, otherwise false. 62 // true if there is an active target process for this ID, otherwise false.
63 bool IsActiveTarget(DWORD process_id); 63 bool IsActiveTarget(DWORD process_id);
64 64
65 private: 65 private:
66 // Releases the Job and notifies the associated Policy object to its 66 // Releases the Job, terminates all job processes with exit_code, and notifies
67 // resources as well. 67 // the associated Policy object to free its resources as well.
68 static void FreeResources(JobTracker* tracker); 68 static void FreeResources(JobTracker* tracker, UINT exit_code);
69 69
70 // The routine that the worker thread executes. It is in charge of 70 // The routine that the worker thread executes. It is in charge of
71 // notifications and cleanup-related tasks. 71 // notifications and cleanup-related tasks.
72 static DWORD WINAPI TargetEventsThread(PVOID param); 72 static DWORD WINAPI TargetEventsThread(PVOID param);
73 73
74 // Removes a target peer from the process list if it expires. 74 // Removes a target peer from the process list if it expires.
75 static VOID CALLBACK RemovePeer(PVOID parameter, BOOLEAN timeout); 75 static VOID CALLBACK RemovePeer(PVOID parameter, BOOLEAN timeout);
76 76
77 // The completion port used by the job objects to communicate events to 77 // The completion port used by the job objects to communicate events to
78 // the worker thread. 78 // the worker thread.
(...skipping 26 matching lines...) Expand all
105 // job. Consult |jobless_process_handles_| for handles of pocess without job. 105 // job. Consult |jobless_process_handles_| for handles of pocess without job.
106 std::set<DWORD> child_process_ids_; 106 std::set<DWORD> child_process_ids_;
107 107
108 DISALLOW_COPY_AND_ASSIGN(BrokerServicesBase); 108 DISALLOW_COPY_AND_ASSIGN(BrokerServicesBase);
109 }; 109 };
110 110
111 } // namespace sandbox 111 } // namespace sandbox
112 112
113 113
114 #endif // SANDBOX_WIN_SRC_BROKER_SERVICES_H_ 114 #endif // SANDBOX_WIN_SRC_BROKER_SERVICES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698