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

Unified Diff: chrome/installer/util/installation_state.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 | « chrome/installer/util/install_util.cc ('k') | chrome/installer/util/installation_validator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/installation_state.cc
diff --git a/chrome/installer/util/installation_state.cc b/chrome/installer/util/installation_state.cc
index ab099246c8276e68a75333c3fca6a3ecb7861a29..be3c2ba0212337a9df45368a3a31a32d2531e44e 100644
--- a/chrome/installer/util/installation_state.cc
+++ b/chrome/installer/util/installation_state.cc
@@ -60,7 +60,9 @@ bool ProductState::Initialize(bool system_install,
std::wstring version_str;
if (key.ReadValue(google_update::kRegVersionField,
&version_str) == ERROR_SUCCESS) {
- version_.reset(Version::GetVersionFromString(WideToASCII(version_str)));
+ version_.reset(new Version(WideToASCII(version_str)));
+ if (!version_->IsValid())
+ version_.reset();
}
// Attempt to read the other values even if the "pv" version value was
@@ -68,8 +70,9 @@ bool ProductState::Initialize(bool system_install,
// only be accessible via InstallationState::GetNonVersionedProductState.
if (key.ReadValue(google_update::kRegOldVersionField,
&version_str) == ERROR_SUCCESS) {
- old_version_.reset(
- Version::GetVersionFromString(WideToASCII(version_str)));
+ old_version_.reset(new Version(WideToASCII(version_str)));
+ if (!old_version_->IsValid())
+ old_version_.reset();
}
key.ReadValue(google_update::kRegRenameCmdField, &rename_cmd_);
@@ -151,9 +154,9 @@ const Version& ProductState::version() const {
ProductState& ProductState::CopyFrom(const ProductState& other) {
channel_.set_value(other.channel_.value());
- version_.reset(other.version_.get() == NULL ? NULL : other.version_->Clone());
+ version_.reset(other.version_.get() ? new Version(*other.version_) : NULL);
old_version_.reset(
- other.old_version_.get() == NULL ? NULL : other.old_version_->Clone());
+ other.old_version_.get() ? new Version(*other.old_version_) : NULL);
brand_ = other.brand_;
rename_cmd_ = other.rename_cmd_;
uninstall_command_ = other.uninstall_command_;
« no previous file with comments | « chrome/installer/util/install_util.cc ('k') | chrome/installer/util/installation_validator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698