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

Unified Diff: base/file_version_info.cc

Issue 15082: Add FilePath support to FileVersionInfo, fix Mac memory issues. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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: base/file_version_info.cc
===================================================================
--- base/file_version_info.cc (revision 7212)
+++ base/file_version_info.cc (working copy)
@@ -40,9 +40,9 @@
// static
FileVersionInfo* FileVersionInfo::CreateFileVersionInfo(
- const std::wstring& file_path) {
+ const FilePath& file_path) {
DWORD dummy;
- const wchar_t* path = file_path.c_str();
+ const wchar_t* path = file_path.value().c_str();
DWORD length = ::GetFileVersionInfoSize(path, &dummy);
if (length == 0)
return NULL;
@@ -71,6 +71,12 @@
}
}
+FileVersionInfo* FileVersionInfo::CreateFileVersionInfo(
+ const std::wstring& file_path) {
+ FilePath file_path_fp = FilePath::FromWStringHack(file_path);
+ return CreateFileVersionInfo(file_path_fp);
+}
+
std::wstring FileVersionInfo::company_name() {
return GetStringValue(L"CompanyName");
}

Powered by Google App Engine
This is Rietveld 408576698