diff options
author | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-20 02:44:30 +0000 |
---|---|---|
committer | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-20 02:44:30 +0000 |
commit | ce4e1b0221cfebad0325137dc5330495775d97c2 (patch) | |
tree | a60d872b2796754f2ae5a4717e1d9b4403b9d1f4 /sandbox/src/interception.h | |
parent | 54d80bb02aa71eb957a863109392cd97ea1e2496 (diff) | |
download | chromium_src-ce4e1b0221cfebad0325137dc5330495775d97c2.zip chromium_src-ce4e1b0221cfebad0325137dc5330495775d97c2.tar.gz chromium_src-ce4e1b0221cfebad0325137dc5330495775d97c2.tar.bz2 |
Redo change 2413 that I had to back out before
- CL is identical and was already lgtm
TBR=rvargas
Review URL: http://codereview.chromium.org/3179
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2435 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/src/interception.h')
-rw-r--r-- | sandbox/src/interception.h | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/sandbox/src/interception.h b/sandbox/src/interception.h index 83169f9..7859883 100644 --- a/sandbox/src/interception.h +++ b/sandbox/src/interception.h @@ -6,8 +6,8 @@ // for the sandboxed process. For more datails see // http://wiki/Main/ChromeSandboxInterceptionDesign -#ifndef SANDBOX_SRC_INTERCEPTION_H__ -#define SANDBOX_SRC_INTERCEPTION_H__ +#ifndef SANDBOX_SRC_INTERCEPTION_H_ +#define SANDBOX_SRC_INTERCEPTION_H_ #include <list> #include <string> @@ -59,7 +59,8 @@ struct DllInterceptionData; // class InterceptionManager { // The unit test will access private members. - FRIEND_TEST(InterceptionManagerTest, BufferLayout); + FRIEND_TEST(InterceptionManagerTest, BufferLayout1); + FRIEND_TEST(InterceptionManagerTest, BufferLayout2); public: // An interception manager performs interceptions on a given child process. @@ -99,11 +100,14 @@ class InterceptionManager { InterceptionType interception_type, const char* replacement_function_name); + // The interception agent will unload the dll with dll_name. + bool AddToUnloadModules(const wchar_t* dll_name); + // Initializes all interceptions on the client. // Returns true on success. // // The child process must be created suspended, and cannot be resumed until - // after this method returns. In addition, no action should be perfomed on + // after this method returns. In addition, no action should be performed on // the child that may cause it to resume momentarily, such as injecting // threads or APCs. // @@ -114,11 +118,11 @@ class InterceptionManager { private: // Used to store the interception information until the actual set-up. struct InterceptionData { - InterceptionType type; // Interception type - std::wstring dll; // Name of dll to intercept - std::string function; // Name of function to intercept - std::string interceptor; // Name of interceptor function - const void* interceptor_address; // Interceptor's entry point + InterceptionType type; // Interception type. + std::wstring dll; // Name of dll to intercept. + std::string function; // Name of function to intercept. + std::string interceptor; // Name of interceptor function. + const void* interceptor_address; // Interceptor's entry point. }; // Calculates the size of the required configuration buffer. @@ -169,10 +173,10 @@ class InterceptionManager { bool CopyDataToChild(const void* local_buffer, size_t buffer_bytes, void** remote_buffer) const; - // Performs the cold patch (from the parent) of ntdll.dll. + // Performs the cold patch (from the parent) of ntdll. // Returns true on success. // - // This method will inser aditional interceptions to launch the interceptor + // This method will insert additional interceptions to launch the interceptor // agent on the child process, if there are additional interceptions to do. bool PatchNtdll(bool hot_patch_needed); @@ -196,10 +200,10 @@ class InterceptionManager { // true if we are allowed to patch already-patched functions. bool relaxed_; - DISALLOW_EVIL_CONSTRUCTORS(InterceptionManager); + DISALLOW_COPY_AND_ASSIGN(InterceptionManager); }; } // namespace sandbox -#endif // SANDBOX_SRC_INTERCEPTION_H__ +#endif // SANDBOX_SRC_INTERCEPTION_H_ |