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

Unified Diff: experimental/windows_debugger/debugger/core/debug_api_mock.h

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 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: experimental/windows_debugger/debugger/core/debug_api_mock.h
diff --git a/experimental/windows_debugger/debugger/core/debug_api_mock.h b/experimental/windows_debugger/debugger/core/debug_api_mock.h
deleted file mode 100644
index e4400a4dcd56e880a497b6ad81b6129eddb22bb8..0000000000000000000000000000000000000000
--- a/experimental/windows_debugger/debugger/core/debug_api_mock.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (c) 2011 The Native Client 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 DEBUGGER_CORE_DEBUG_API_MOCK_H_
-#define DEBUGGER_CORE_DEBUG_API_MOCK_H_
-#include <deque>
-#include "debugger/core/debug_api.h"
-
-namespace debug {
-/// This class is a mock of DebugAPI, used in unit tests.
-///
-/// This is pure mock, Windows API is never called.
-/// |DebugAPIMock| keeps a queue of function call,
-/// so that sequence of API calls can be verified by |CompareCallSequence|.
-/// Parameters of the API calls are not tracked / verified.
-class DebugAPIMock : public DebugAPI {
- public:
- enum FunctionId {
- kCreateProcess,
- kCloseHandle,
- kReadProcessMemory,
- kWriteProcessMemory,
- kFlushInstructionCache,
- kGetThreadContext,
- kSetThreadContext,
- kWaitForDebugEvent,
- kContinueDebugEvent,
- kTerminateThread,
- kDebugBreakProcess,
- kWow64GetThreadContext,
- kWow64SetThreadContext,
- kIsWoW64Process,
- kDebugActiveProcess,
- kDebugActiveProcessStop,
- };
-
- DebugAPIMock();
-
- void ClearCallSequence();
- bool CompareCallSequence(const std::deque<FunctionId>& call_list) const;
-
- virtual BOOL CreateProcess(LPCTSTR lpApplicationName,
- LPTSTR lpCommandLine,
- LPSECURITY_ATTRIBUTES lpProcessAttributes,
- LPSECURITY_ATTRIBUTES lpThreadAttributes,
- BOOL bInheritHandles,
- DWORD dwCreationFlags,
- LPVOID lpEnvironment,
- LPCTSTR lpCurrentDirectory,
- LPSTARTUPINFO lpStartupInfo,
- LPPROCESS_INFORMATION lpProcessInformation);
-
- virtual BOOL CloseHandle(HANDLE hObject);
-
- virtual BOOL ReadProcessMemory(HANDLE hProcess,
- LPCVOID lpBaseAddress,
- LPVOID lpBuffer,
- SIZE_T nSize,
- SIZE_T *lpNumberOfBytesRead);
-
- virtual BOOL WriteProcessMemory(HANDLE hProcess,
- LPVOID lpBaseAddress,
- LPCVOID lpBuffer,
- SIZE_T nSize,
- SIZE_T *lpNumberOfBytesWritten);
-
- virtual BOOL FlushInstructionCache(HANDLE hProcess,
- LPCVOID lpBaseAddress,
- SIZE_T dwSize);
-
-
- virtual BOOL GetThreadContext(HANDLE hThread, LPCONTEXT lpContext);
- virtual BOOL SetThreadContext(HANDLE hThread, CONTEXT *lpContext);
-
- virtual BOOL WaitForDebugEvent(LPDEBUG_EVENT lpDebugEvent,
- DWORD dwMilliseconds);
-
- virtual BOOL ContinueDebugEvent(DWORD dwProcessId,
- DWORD dwThreadId,
- DWORD dwContinueStatus);
-
- virtual BOOL TerminateThread(HANDLE hThread, DWORD dwExitCode);
- virtual BOOL DebugBreakProcess(HANDLE Process);
-
- virtual BOOL Wow64GetThreadContext(HANDLE hThread, PWOW64_CONTEXT lpContext);
- virtual BOOL Wow64SetThreadContext(HANDLE hThread,
- const WOW64_CONTEXT* lpContext);
- virtual BOOL IsWoW64Process(HANDLE hProcess, PBOOL Wow64Process);
- virtual BOOL DebugActiveProcess(DWORD dwProcessId);
- virtual BOOL DebugActiveProcessStop(DWORD dwProcessId);
-
- bool single_step_enabled_;
- std::deque<FunctionId> called_functions_;
-};
-} // namespace debug
-
-#endif // DEBUGGER_CORE_DEBUG_API_MOCK_H_
-

Powered by Google App Engine
This is Rietveld 408576698