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

Unified Diff: base/file_version_info_win.cc

Issue 6897016: Base: Fix FileVersionInfo::CreateFileVersionInfoForCurrentModule so that (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_version_info_win.cc
===================================================================
--- base/file_version_info_win.cc (revision 82561)
+++ base/file_version_info_win.cc (working copy)
@@ -31,11 +31,16 @@
} LanguageAndCodePage;
// static
-FileVersionInfo* FileVersionInfo::CreateFileVersionInfoForCurrentModule() {
- FilePath app_path;
- if (!PathService::Get(base::FILE_MODULE, &app_path))
+FileVersionInfo* FileVersionInfo::CreateFileVersionInfoForModule(
+ HMODULE module) {
+ // Note that the use of MAX_PATH is basically in line with what we do for
+ // all registered paths (PathProviderWin).
+ wchar_t system_buffer[MAX_PATH];
+ system_buffer[0] = 0;
+ if (!GetModuleFileName(module, system_buffer, MAX_PATH))
return NULL;
+ FilePath app_path(system_buffer);
return CreateFileVersionInfo(app_path);
}
« no previous file with comments | « base/file_version_info_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698