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

Unified Diff: chrome/app/client_util.cc

Issue 10683005: Remove two deprecated methods from base::Version (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 8 years, 6 months 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_unittest.cc ('k') | chrome/browser/chrome_browser_main_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
diff --git a/chrome/app/client_util.cc b/chrome/app/client_util.cc
index 49ad1fa596685783f5ecb2b833e7a8b180bcb532..1fd5e10cafd425734acd6da5f4f595024c06e5f3 100644
--- a/chrome/app/client_util.cc
+++ b/chrome/app/client_util.cc
@@ -354,13 +354,13 @@ HMODULE MainDllLoader::Load(std::wstring* out_version, std::wstring* out_file) {
return dll;
std::wstring version_string;
- scoped_ptr<Version> version;
+ 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 = Version(WideToASCII(version_string));
- if (!version.get()) {
+ if (!version.IsValid()) {
// If a bogus command line flag was given, then abort.
LOG(ERROR) << "Invalid command line version: " << version_string;
return NULL;
@@ -368,17 +368,17 @@ HMODULE MainDllLoader::Load(std::wstring* out_version, std::wstring* out_file) {
}
// If no version on the command line, then look in the environment.
- if (!version.get()) {
+ if (!version.IsValid()) {
if (EnvQueryStr(ASCIIToWide(chrome::kChromeVersionEnvVar).c_str(),
&version_string)) {
- version.reset(Version::GetVersionFromString(WideToASCII(version_string)));
- LOG_IF(ERROR, !version.get()) << "Invalid environment version: "
- << version_string;
+ version = Version(WideToASCII(version_string));
+ LOG_IF(ERROR, !version.IsValid()) << "Invalid environment version: "
+ << version_string;
}
}
// If no version in the environment, then look in the registry.
- if (!version.get()) {
+ if (!version.IsValid()) {
version_string = GetVersion();
if (version_string.empty()) {
LOG(ERROR) << "Could not get Chrome DLL version.";
« no previous file with comments | « base/version_unittest.cc ('k') | chrome/browser/chrome_browser_main_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698