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/memory_details_mac.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/memory_details_mac.cc')
-rw-r--r-- | chrome/browser/memory_details_mac.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/memory_details_mac.cc b/chrome/browser/memory_details_mac.cc index 74a58d9..26b9fbf 100644 --- a/chrome/browser/memory_details_mac.cc +++ b/chrome/browser/memory_details_mac.cc @@ -15,6 +15,7 @@ #include "base/string_util.h" #include "base/process_util.h" #include "base/thread.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/browser_child_process_host.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_thread.h" @@ -198,10 +199,10 @@ void MemoryDetails::CollectProcessDataChrome( else info.type = ChildProcessInfo::UNKNOWN_PROCESS; - scoped_ptr<FileVersionInfo> version_info(chrome::GetChromeVersionInfo()); - if (version_info.get()) { - info.product_name = version_info->product_name(); - info.version = version_info->product_version(); + chrome::VersionInfo version_info; + if (version_info.is_valid()) { + info.product_name = ASCIIToWide(version_info.Name()); + info.version = ASCIIToWide(version_info.Version()); } else { info.product_name = process_data_[CHROME_BROWSER].name; info.version = L""; |