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

Unified Diff: sandbox/win/tests/integration_tests/hooking_dll.h

Issue 2944493002: [Windows Sandbox Tests] Process Mitigations. (Closed)
Patch Set: Code review fixes, part 1. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: sandbox/win/tests/integration_tests/hooking_dll.h
diff --git a/sandbox/win/tests/integration_tests/hooking_dll.h b/sandbox/win/tests/integration_tests/hooking_dll.h
new file mode 100644
index 0000000000000000000000000000000000000000..a36c436ce44a71dc75413169bc08337a3abfe9c5
--- /dev/null
+++ b/sandbox/win/tests/integration_tests/hooking_dll.h
@@ -0,0 +1,32 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SANDBOX_TESTS_INTEGRATION_TESTS_HOOKING_DLL_H_
+#define SANDBOX_TESTS_INTEGRATION_TESTS_HOOKING_DLL_H_
+
+#include <windows.h>
+
+#ifdef BUILDING_DLL
+#define DLL_EXPORT __declspec(dllexport)
+#else
+#define DLL_EXPORT __declspec(dllimport)
+#endif
+
+namespace hooking_dll {
+
+constexpr wchar_t g_hook_event[] = L"ChromeExtensionTestHookEvent";
+
+constexpr char g_hook_handler_func[] = "HookProc";
Will Harris 2017/06/28 12:27:54 same comment for g_hook_handler_func
+constexpr char g_was_hook_called_func[] = "WasHookCalled";
Will Harris 2017/06/28 12:27:54 same comment for g_was_hook_called_func
+constexpr char g_set_hook_func[] = "SetHook";
Will Harris 2017/06/28 12:27:54 same comment for g_set_hook_func
+
+DLL_EXPORT void SetHook(HHOOK hook_handle);
+
+DLL_EXPORT bool WasHookCalled();
+
+DLL_EXPORT LRESULT HookProc(int code, WPARAM w_param, LPARAM l_param);
+
+} // namespace hooking_dll
+
+#endif // SANDBOX_TESTS_INTEGRATION_TESTS_HOOKING_DLL_H_

Powered by Google App Engine
This is Rietveld 408576698