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/test/reliability/page_load_test.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/test/reliability/page_load_test.cc')
-rw-r--r-- | chrome/test/reliability/page_load_test.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc index d5344bb..a903032 100644 --- a/chrome/test/reliability/page_load_test.cc +++ b/chrome/test/reliability/page_load_test.cc @@ -158,21 +158,23 @@ class PageLoadTest : public UITest { g_test_log_path = FilePath(FILE_PATH_LITERAL("test_log.log")); test_log.open(g_test_log_path.value().c_str()); + // Get the version of Chrome we're running. + std::string last_change; +#if defined(OS_WIN) // Check file version info for chrome dll. scoped_ptr<FileVersionInfo> file_info; -#if defined(OS_WIN) file_info.reset(FileVersionInfo::CreateFileVersionInfo(kChromeDll)); + last_change = WideToASCII(file_info->last_change()); #elif defined(OS_LINUX) || defined(OS_MACOSX) // TODO(fmeawad): On Mac, the version retrieved here belongs to the test // module and not the chrome binary, need to be changed to chrome binary // instead. - file_info.reset(chrome::GetChromeVersionInfo()); + chrome::VersionInfo version_info; + last_change = version_info.LastChange(); #endif // !defined(OS_WIN) - std::wstring last_change = file_info->last_change(); test_log << "Last Change: "; test_log << last_change << std::endl; - // Log timestamp for test start. base::Time time_now = base::Time::Now(); double time_start = time_now.ToDoubleT(); |