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

Unified Diff: chrome/browser/win/enumerate_modules_model.cc

Issue 2046583002: Don't use ::GetFileVersionInfo() in CreateFileVersionInfoForModule() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
« no previous file with comments | « base/file_version_info_win_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/win/enumerate_modules_model.cc
diff --git a/chrome/browser/win/enumerate_modules_model.cc b/chrome/browser/win/enumerate_modules_model.cc
index d3c03da91931d3072790cbf8130853f6b60f7654..7c74cf4511c6e4e8e486093751ba457bdcad9e58 100644
--- a/chrome/browser/win/enumerate_modules_model.cc
+++ b/chrome/browser/win/enumerate_modules_model.cc
@@ -15,7 +15,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/environment.h"
-#include "base/file_version_info_win.h"
+#include "base/file_version_info.h"
#include "base/files/file_path.h"
#include "base/i18n/case_conversion.h"
#include "base/macros.h"
@@ -630,16 +630,10 @@ void ModuleEnumerator::PopulateModuleInformation(Module* module) {
module->recommended_action = NONE;
std::unique_ptr<FileVersionInfo> version_info(
FileVersionInfo::CreateFileVersionInfo(base::FilePath(module->location)));
- if (version_info.get()) {
- FileVersionInfoWin* version_info_win =
- static_cast<FileVersionInfoWin*>(version_info.get());
-
- VS_FIXEDFILEINFO* fixed_file_info = version_info_win->fixed_file_info();
- if (fixed_file_info) {
- module->description = version_info_win->file_description();
- module->version = version_info_win->file_version();
- module->product_name = version_info_win->product_name();
- }
+ if (version_info) {
+ module->description = version_info->file_description();
+ module->version = version_info->file_version();
+ module->product_name = version_info->product_name();
}
}
« no previous file with comments | « base/file_version_info_win_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698