diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-27 20:28:42 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-27 20:28:42 +0000 |
commit | 0211f57eabdc1a3e34aee1e1629c26e93b803ded (patch) | |
tree | 3bcbab3506e5f3dbcbc99825529cc803d223b017 /chrome/browser/bug_report_util.cc | |
parent | 1f8322043d302eb0f6a050a21d2f0f9a8c1df71e (diff) | |
download | chromium_src-0211f57eabdc1a3e34aee1e1629c26e93b803ded.zip chromium_src-0211f57eabdc1a3e34aee1e1629c26e93b803ded.tar.gz chromium_src-0211f57eabdc1a3e34aee1e1629c26e93b803ded.tar.bz2 |
Refactor version-getting info into a chrome::VersionInfo object.
I was trying to replace wstring usage in base::FileVersionInfo, but
that class is rather Windows-specific with strange fields like
"private_build()" where the value and encoding aren't clear. 95%
of the users of FileVersionInfo actually just care about the current
Chrome version, so we can provide a much simpler interface for them.
We still use FileVersionInfo for retrieving information from e.g.
plugin DLLs, but in those cases the usage is clearer.
Review URL: http://codereview.chromium.org/3135028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57725 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bug_report_util.cc')
-rw-r--r-- | chrome/browser/bug_report_util.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/chrome/browser/bug_report_util.cc b/chrome/browser/bug_report_util.cc index 71d8612..04db543 100644 --- a/chrome/browser/bug_report_util.cc +++ b/chrome/browser/bug_report_util.cc @@ -274,17 +274,14 @@ void BugReportUtil::SendReport(Profile* profile, web_data->set_url(page_url_text); // Add the Chrome version - std::string chrome_version; - scoped_ptr<FileVersionInfo> version_info(chrome::GetChromeVersionInfo()); - if (version_info.get()) { - chrome_version = WideToUTF8(version_info->product_name()) + " - " + - WideToUTF8(version_info->file_version()) + - " (" + WideToUTF8(version_info->last_change()) + ")"; - } - - if (!chrome_version.empty()) + chrome::VersionInfo version_info; + if (version_info.is_valid()) { + std::string chrome_version = version_info.Name() + " - " + + version_info.Version() + + " (" + version_info.LastChange() + ")"; AddFeedbackData(&feedback_data, std::string(kChromeVersionTag), chrome_version); + } // Add OS version (eg, for WinXP SP2: "5.1.2600 Service Pack 2"). std::string os_version = ""; |