diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-17 00:09:50 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-17 00:09:50 +0000 |
commit | bf94d1a4cee4be0648778022f27100f8a074e34a (patch) | |
tree | bc9c5a831207e06e5cbd179eafc9ffa2ea791589 /chrome/browser | |
parent | e31134ff5c4b5889af71cc58b294d1935fd48322 (diff) | |
download | chromium_src-bf94d1a4cee4be0648778022f27100f8a074e34a.zip chromium_src-bf94d1a4cee4be0648778022f27100f8a074e34a.tar.gz chromium_src-bf94d1a4cee4be0648778022f27100f8a074e34a.tar.bz2 |
base/version: remove wstring version
And fix callers.
BUG=23581
TEST=trybots
Review URL: http://codereview.chromium.org/5848005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69490 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/enumerate_modules_model_win.cc | 2 | ||||
-rw-r--r-- | chrome/browser/extensions/external_registry_extension_provider_win.cc | 9 | ||||
-rw-r--r-- | chrome/browser/gpu_blacklist.cc | 3 | ||||
-rw-r--r-- | chrome/browser/ui/views/about_chrome_view.cc | 14 | ||||
-rw-r--r-- | chrome/browser/ui/views/about_chrome_view.h | 4 |
5 files changed, 18 insertions, 14 deletions
diff --git a/chrome/browser/enumerate_modules_model_win.cc b/chrome/browser/enumerate_modules_model_win.cc index 9de5c76..83dc535 100644 --- a/chrome/browser/enumerate_modules_model_win.cc +++ b/chrome/browser/enumerate_modules_model_win.cc @@ -266,7 +266,7 @@ ModuleEnumerator::ModuleStatus ModuleEnumerator::Match( // We have a name match against the blacklist (and possibly location match // also), so check version. scoped_ptr<Version> module_version( - Version::GetVersionFromString(module.version)); + Version::GetVersionFromString(UTF16ToASCII(module.version))); scoped_ptr<Version> version_min( Version::GetVersionFromString(blacklisted.version_from)); scoped_ptr<Version> version_max( diff --git a/chrome/browser/extensions/external_registry_extension_provider_win.cc b/chrome/browser/extensions/external_registry_extension_provider_win.cc index daf3d99..16b107f 100644 --- a/chrome/browser/extensions/external_registry_extension_provider_win.cc +++ b/chrome/browser/extensions/external_registry_extension_provider_win.cc @@ -58,7 +58,8 @@ void ExternalRegistryExtensionProvider::VisitRegisteredExtension( StringToLowerASCII(&id); scoped_ptr<Version> version; - version.reset(Version::GetVersionFromString(extension_version)); + version.reset(Version::GetVersionFromString( + WideToASCII(extension_version))); if (!version.get()) { LOG(ERROR) << "Invalid version value " << extension_version << " for key " << key_path; @@ -103,8 +104,10 @@ bool ExternalRegistryExtensionProvider::GetExtensionDetails( if (!key.ReadValue(kRegistryExtensionVersion, &extension_version)) return false; - if (version) - version->reset(Version::GetVersionFromString(extension_version)); + if (version) { + version->reset(Version::GetVersionFromString( + WideToASCII(extension_version))); + } if (location) *location = Extension::EXTERNAL_REGISTRY; diff --git a/chrome/browser/gpu_blacklist.cc b/chrome/browser/gpu_blacklist.cc index fe246d6..85063a8 100644 --- a/chrome/browser/gpu_blacklist.cc +++ b/chrome/browser/gpu_blacklist.cc @@ -7,6 +7,7 @@ #include "base/json/json_reader.h" #include "base/logging.h" #include "base/string_number_conversions.h" +#include "base/string_util.h" #include "base/stringprintf.h" #include "base/sys_info.h" #include "base/values.h" @@ -369,7 +370,7 @@ GpuFeatureFlags GpuBlacklist::DetermineGpuFeatureFlags( if (gpu_info.progress() == GPUInfo::kUninitialized) return flags; scoped_ptr<Version> driver_version( - Version::GetVersionFromString(gpu_info.driver_version())); + Version::GetVersionFromString(WideToASCII(gpu_info.driver_version()))); if (driver_version.get() == NULL) return flags; diff --git a/chrome/browser/ui/views/about_chrome_view.cc b/chrome/browser/ui/views/about_chrome_view.cc index 9e58f04..215c6f0 100644 --- a/chrome/browser/ui/views/about_chrome_view.cc +++ b/chrome/browser/ui/views/about_chrome_view.cc @@ -156,16 +156,16 @@ void AboutChromeView::Init() { return; } - current_version_ = ASCIIToWide(version_info.Version()); + current_version_ = version_info.Version(); std::string version_modifier = platform_util::GetVersionStringModifier(); if (!version_modifier.empty()) - version_details_ += L" " + ASCIIToWide(version_modifier); + version_details_ += " " + version_modifier; #if !defined(GOOGLE_CHROME_BUILD) - version_details_ += L" ("; - version_details_ += ASCIIToWide(version_info.LastChange()); - version_details_ += L")"; + version_details_ += " ("; + version_details_ += version_info.LastChange(); + version_details_ += ")"; #endif // Views we will add to the *parent* of this dialog, since it will display @@ -210,7 +210,7 @@ void AboutChromeView::Init() { // This is a text field so people can copy the version number from the dialog. version_label_ = new views::Textfield(); - version_label_->SetText(WideToUTF16Hack(current_version_ + version_details_)); + version_label_->SetText(ASCIIToUTF16(current_version_ + version_details_)); version_label_->SetReadOnly(true); version_label_->RemoveBorder(); version_label_->SetTextColor(SK_ColorBLACK); @@ -763,7 +763,7 @@ void AboutChromeView::UpdateStatus(GoogleUpdateUpgradeResult result, std::wstring update_label_text = l10n_util::GetStringF(IDS_UPGRADE_ALREADY_UP_TO_DATE, l10n_util::GetString(IDS_PRODUCT_NAME), - current_version_); + ASCIIToUTF16(current_version_)); #endif if (base::i18n::IsRTL()) { update_label_text.push_back( diff --git a/chrome/browser/ui/views/about_chrome_view.h b/chrome/browser/ui/views/about_chrome_view.h index a2ed439..ab287be 100644 --- a/chrome/browser/ui/views/about_chrome_view.h +++ b/chrome/browser/ui/views/about_chrome_view.h @@ -146,10 +146,10 @@ class AboutChromeView : public views::View, #endif // Our current version. - std::wstring current_version_; + std::string current_version_; // Additional information about the version (channel and build number). - std::wstring version_details_; + std::string version_details_; // The version Google Update reports is available to us. std::wstring new_version_available_; |