diff options
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/chrome_frame_reporting.cc | 28 | ||||
-rw-r--r-- | chrome_frame/chrome_tab_version.rc.version | 1 |
2 files changed, 22 insertions, 7 deletions
diff --git a/chrome_frame/chrome_frame_reporting.cc b/chrome_frame/chrome_frame_reporting.cc index c2cc282..170a710 100644 --- a/chrome_frame/chrome_frame_reporting.cc +++ b/chrome_frame/chrome_frame_reporting.cc @@ -6,6 +6,7 @@ #include "base/file_util.h" #include "base/logging.h" +#include "base/file_version_info.h" #include "base/win_util.h" #include "chrome/installer/util/google_update_settings.h" #include "chrome/installer/util/install_util.h" @@ -14,12 +15,25 @@ // Well known SID for the system principal. const wchar_t kSystemPrincipalSid[] = L"S-1-5-18"; -// Returns the custom info structure based on the dll in parameter and the -// process type. -google_breakpad::CustomClientInfo* GetCustomInfo() { - // TODO(joshia): Grab these based on build. - static google_breakpad::CustomInfoEntry ver_entry(L"ver", L"0.1.0.0"); - static google_breakpad::CustomInfoEntry prod_entry(L"prod", L"ChromeFrame"); +// Returns the custom info structure based on the dll in parameter +google_breakpad::CustomClientInfo* GetCustomInfo(const wchar_t* dll_path) { + std::wstring product; + std::wstring version; + scoped_ptr<FileVersionInfo> + version_info(FileVersionInfo::CreateFileVersionInfo(dll_path)); + if (version_info.get()) { + version = version_info->product_version(); + product = version_info->product_short_name(); + } + + if (version.empty()) + version = L"0.1.0.0"; + + if (product.empty()) + product = L"ChromeFrame"; + + static google_breakpad::CustomInfoEntry ver_entry(L"ver", version.c_str()); + static google_breakpad::CustomInfoEntry prod_entry(L"prod", product.c_str()); static google_breakpad::CustomInfoEntry plat_entry(L"plat", L"Win32"); static google_breakpad::CustomInfoEntry type_entry(L"ptype", L"chrome_frame"); static google_breakpad::CustomInfoEntry entries[] = { @@ -60,7 +74,7 @@ bool InitializeCrashReporting() { } return InitializeVectoredCrashReporting(false, user_sid.c_str(), - temp_directory.value(), GetCustomInfo()); + temp_directory.value(), GetCustomInfo(dll_path)); } bool ShutdownCrashReporting() { diff --git a/chrome_frame/chrome_tab_version.rc.version b/chrome_frame/chrome_tab_version.rc.version index 84c02f4..90e446a 100644 --- a/chrome_frame/chrome_tab_version.rc.version +++ b/chrome_frame/chrome_tab_version.rc.version @@ -24,6 +24,7 @@ BEGIN VALUE "CompanyName", "@COMPANY_FULLNAME@" VALUE "CompanyShortName", "@COMPANY_SHORTNAME@" VALUE "ProductName", "Google Chrome Frame" + VALUE "ProductShortName", "ChromeFrame" VALUE "ProductVersion", "@MAJOR@.@MINOR@.@BUILD@.@PATCH@" VALUE "FileDescription", "Chrome Frame renders the Web of the future in the browsers of the past. It's like strapping a rocket engine to a minivan." VALUE "FileVersion", "@MAJOR@.@MINOR@.@BUILD@.@PATCH@" |