| Index: util/win/get_module_information.cc
|
| diff --git a/util/file/file_seeker.cc b/util/win/get_module_information.cc
|
| similarity index 53%
|
| copy from util/file/file_seeker.cc
|
| copy to util/win/get_module_information.cc
|
| index a38e2f918546e955a1e114215907c35f3820a230..1a9fd0c4016b15e070b5df1f4fd466a532b0edf0 100644
|
| --- a/util/file/file_seeker.cc
|
| +++ b/util/win/get_module_information.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2015 The Crashpad Authors. All rights reserved.
|
| +// Copyright 2016 The Crashpad Authors. All rights reserved.
|
| //
|
| // Licensed under the Apache License, Version 2.0 (the "License");
|
| // you may not use this file except in compliance with the License.
|
| @@ -12,26 +12,19 @@
|
| // See the License for the specific language governing permissions and
|
| // limitations under the License.
|
|
|
| -#include "util/file/file_seeker.h"
|
| +#include "util/win/get_module_information.h"
|
|
|
| -#include "base/logging.h"
|
| +#include "util/win/get_function.h"
|
|
|
| namespace crashpad {
|
|
|
| -FileOffset FileSeekerInterface::SeekGet() {
|
| - return Seek(0, SEEK_CUR);
|
| -}
|
| -
|
| -bool FileSeekerInterface::SeekSet(FileOffset offset) {
|
| - FileOffset rv = Seek(offset, SEEK_SET);
|
| - if (rv < 0) {
|
| - // Seek() will have logged its own error.
|
| - return false;
|
| - } else if (rv != offset) {
|
| - LOG(ERROR) << "SeekSet(): expected " << offset << ", observed " << rv;
|
| - return false;
|
| - }
|
| - return true;
|
| +BOOL CrashpadGetModuleInformation(HANDLE process,
|
| + HMODULE module,
|
| + MODULEINFO* module_info,
|
| + DWORD cb) {
|
| + static const auto get_module_information =
|
| + GET_FUNCTION_REQUIRED(L"psapi.dll", GetModuleInformation);
|
| + return get_module_information(process, module, module_info, cb);
|
| }
|
|
|
| } // namespace crashpad
|
|
|