diff options
author | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-17 00:28:03 +0000 |
---|---|---|
committer | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-17 00:28:03 +0000 |
commit | 680d201ec4f79642cca4073145fdb86e809eb03c (patch) | |
tree | 2d90a0f932cffb68277d65152eedd7c6e5f35d4f /chrome/app/client_util.cc | |
parent | bf94d1a4cee4be0648778022f27100f8a074e34a (diff) | |
download | chromium_src-680d201ec4f79642cca4073145fdb86e809eb03c.zip chromium_src-680d201ec4f79642cca4073145fdb86e809eb03c.tar.gz chromium_src-680d201ec4f79642cca4073145fdb86e809eb03c.tar.bz2 |
Revert 69490 - base/version: remove wstring version
And fix callers.
BUG=23581
TEST=trybots
Review URL: http://codereview.chromium.org/5848005
TBR=evan@chromium.org
Review URL: http://codereview.chromium.org/5905006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69491 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/client_util.cc')
-rw-r--r-- | chrome/app/client_util.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/chrome/app/client_util.cc b/chrome/app/client_util.cc index 263ed8b..0c1a8ac 100644 --- a/chrome/app/client_util.cc +++ b/chrome/app/client_util.cc @@ -11,7 +11,6 @@ #include "base/file_util.h" #include "base/logging.h" #include "base/scoped_ptr.h" -#include "base/string_util.h" #include "base/utf_string_conversions.h" #include "base/version.h" #include "chrome/app/breakpad_win.h" @@ -214,25 +213,26 @@ HMODULE MainDllLoader::Load(std::wstring* out_version, std::wstring* out_file) { if (dll) return dll; - std::wstring version_string; + std::wstring version_env_string; scoped_ptr<Version> version; const CommandLine& cmd_line = *CommandLine::ForCurrentProcess(); if (cmd_line.HasSwitch(switches::kChromeVersion)) { - version_string = cmd_line.GetSwitchValueNative(switches::kChromeVersion); - version.reset(Version::GetVersionFromString(WideToASCII(version_string))); + version_env_string = cmd_line.GetSwitchValueNative( + switches::kChromeVersion); + version.reset(Version::GetVersionFromString(version_env_string)); if (!version.get()) { // If a bogus command line flag was given, then abort. LOG(ERROR) << "Invalid version string received on command line: " - << version_string; + << version_env_string; return NULL; } } if (!version.get()) { if (EnvQueryStr(ASCIIToWide(chrome::kChromeVersionEnvVar).c_str(), - &version_string)) { - version.reset(Version::GetVersionFromString(WideToASCII(version_string))); + &version_env_string)) { + version.reset(Version::GetVersionFromString(version_env_string)); } } @@ -241,13 +241,13 @@ HMODULE MainDllLoader::Load(std::wstring* out_version, std::wstring* out_file) { // Look into the registry to find the latest version. We don't validate // this by building a Version object to avoid harming normal case startup // time. - version_string.clear(); - GetVersion(dir.c_str(), reg_path.c_str(), &version_string); + version_env_string.clear(); + GetVersion(dir.c_str(), reg_path.c_str(), &version_env_string); } - if (version.get() || !version_string.empty()) { + if (version.get() || !version_env_string.empty()) { *out_file = dir; - *out_version = version_string; + *out_version = version_env_string; out_file->append(*out_version).append(L"\\"); return LoadChromeWithDirectory(out_file); } else { |