diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-18 00:31:30 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-18 00:31:30 +0000 |
commit | d9cb161850584e5d277b141aadb68abec0af28bb (patch) | |
tree | 52cdb82bc14b488f7c93edcaa018550fcd8c9cc3 /chrome_frame | |
parent | 92f132ae9e06a0f55d65b44a324ac74b53a2945d (diff) | |
download | chromium_src-d9cb161850584e5d277b141aadb68abec0af28bb.zip chromium_src-d9cb161850584e5d277b141aadb68abec0af28bb.tar.gz chromium_src-d9cb161850584e5d277b141aadb68abec0af28bb.tar.bz2 |
file_version_info was not finding Mac values correctly.
Changed file_version_info to find Mac values, and changed version_info to fail if values can't be found.
BUG=NONE
TEST=BUILD
Review URL: http://codereview.chromium.org/5815001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69592 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/metrics_service.cc | 20 | ||||
-rw-r--r-- | chrome_frame/renderer_glue.cc | 11 |
2 files changed, 13 insertions, 18 deletions
diff --git a/chrome_frame/metrics_service.cc b/chrome_frame/metrics_service.cc index d82e16b..1ca8caa 100644 --- a/chrome_frame/metrics_service.cc +++ b/chrome_frame/metrics_service.cc @@ -608,17 +608,11 @@ bool MetricsService::UploadData() { // static std::string MetricsService::GetVersionString() { chrome::VersionInfo version_info; - if (version_info.is_valid()) { - std::string version = version_info.Version(); - // Add the -F extensions to ensure that UMA data uploaded by ChromeFrame - // lands in the ChromeFrame bucket. - version += "-F"; - if (!version_info.IsOfficialBuild()) - version.append("-devel"); - return version; - } else { - NOTREACHED() << "Unable to retrieve version string."; - } - - return std::string(); + std::string version = version_info.Version(); + // Add the -F extensions to ensure that UMA data uploaded by ChromeFrame + // lands in the ChromeFrame bucket. + version += "-F"; + if (!version_info.IsOfficialBuild()) + version.append("-devel"); + return version; } diff --git a/chrome_frame/renderer_glue.cc b/chrome_frame/renderer_glue.cc index 8980e97..3e973bc 100644 --- a/chrome_frame/renderer_glue.cc +++ b/chrome_frame/renderer_glue.cc @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/common/chrome_version_info.h" +#include "base/file_version_info.h" +#include "base/scoped_ptr.h" +#include "base/string_util.h" namespace webkit_glue { @@ -10,12 +12,11 @@ namespace webkit_glue { // here instead of pulling in the whole renderer lib where this function // is implemented for Chrome. std::string GetProductVersion() { - chrome::VersionInfo version_info; + scoped_ptr<FileVersionInfo> info( + FileVersionInfo::CreateFileVersionInfoForCurrentModule()); std::string product("Chrome/"); - product += version_info.is_valid() ? version_info.Version() - : "0.0.0.0"; + product += info.get() ? WideToASCII(info->product_version()) : "0.0.0.0"; return product; } } // end namespace webkit_glue - |