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

Unified Diff: chrome/installer/util/installer_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
Index: chrome/installer/util/installer_state.cc
diff --git a/chrome/installer/util/installer_state.cc b/chrome/installer/util/installer_state.cc
index bbf3a33682b53dc47acfd2fcf5c040cd6ba1d8f9..56cc1d99005a897f98859f787906476c5e41cfad 100644
--- a/chrome/installer/util/installer_state.cc
+++ b/chrome/installer/util/installer_state.cc
@@ -412,7 +412,7 @@ Version* InstallerState::GetCurrentVersion(
if (version == NULL)
version = &product_state->version();
- current_version.reset(version->Clone());
+ current_version.reset(new Version(*version));
}
return current_version.release();
@@ -467,7 +467,7 @@ void InstallerState::RemoveOldVersionDirectories(
const Version& new_version,
Version* existing_version,
const FilePath& temp_path) const {
- scoped_ptr<Version> version;
+ Version version;
std::vector<FilePath> key_files;
scoped_ptr<WorkItem> item;
@@ -478,12 +478,12 @@ void InstallerState::RemoveOldVersionDirectories(
for (FilePath next_version = version_enum.Next(); !next_version.empty();
next_version = version_enum.Next()) {
FilePath dir_name(next_version.BaseName());
- version.reset(Version::GetVersionFromString(WideToASCII(dir_name.value())));
+ version = Version(WideToASCII(dir_name.value()));
// Delete the version folder if it is less than the new version and not
// equal to the old version (if we have an old version).
- if (version.get() &&
- version->CompareTo(new_version) < 0 &&
- (existing_version == NULL || !version->Equals(*existing_version))) {
+ if (version.IsValid() &&
+ version.CompareTo(new_version) < 0 &&
+ (existing_version == NULL || !version.Equals(*existing_version))) {
// Collect the key files (relative to the version dir) for all products.
key_files.clear();
std::for_each(products_.begin(), products_.end(),
« no previous file with comments | « chrome/installer/util/installation_validator_unittest.cc ('k') | chrome/installer/util/installer_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698