diff options
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 - |