Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(821)

Unified Diff: chrome/app/client_util.cc

Issue 5905006: Revert 69490 - base/version: remove wstring version... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/version.cc ('k') | chrome/browser/enumerate_modules_model_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/client_util.cc
===================================================================
--- chrome/app/client_util.cc (revision 69490)
+++ chrome/app/client_util.cc (working copy)
@@ -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 @@
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 @@
// 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 {
« no previous file with comments | « base/version.cc ('k') | chrome/browser/enumerate_modules_model_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698