summaryrefslogtreecommitdiffstats
path: root/chrome/browser/memory_details_win.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-27 20:28:42 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-27 20:28:42 +0000
commit0211f57eabdc1a3e34aee1e1629c26e93b803ded (patch)
tree3bcbab3506e5f3dbcbc99825529cc803d223b017 /chrome/browser/memory_details_win.cc
parent1f8322043d302eb0f6a050a21d2f0f9a8c1df71e (diff)
downloadchromium_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_win.cc')
-rw-r--r--chrome/browser/memory_details_win.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/memory_details_win.cc b/chrome/browser/memory_details_win.cc
index 5871687..1e6d985 100644
--- a/chrome/browser/memory_details_win.cc
+++ b/chrome/browser/memory_details_win.cc
@@ -8,6 +8,7 @@
#include "app/l10n_util.h"
#include "base/file_version_info.h"
#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_child_process_host.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/renderer_host/backing_store_manager.h"
@@ -121,10 +122,9 @@ void MemoryDetails::CollectProcessData(
// Get Version Information.
TCHAR name[MAX_PATH];
if (index2 == CHROME_BROWSER || index2 == CHROME_NACL_PROCESS) {
- scoped_ptr<FileVersionInfo> version_info(
- chrome::GetChromeVersionInfo());
- if (version_info != NULL)
- info.version = version_info->file_version();
+ chrome::VersionInfo version_info;
+ if (version_info.is_valid())
+ info.version = ASCIIToWide(version_info.Version());
// Check if this is one of the child processes whose data we collected
// on the IO thread, and if so copy over that data.
for (size_t child = 0; child < child_info.size(); child++) {