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

Unified Diff: chrome/installer/setup/install.cc

Issue 1575523002: Comparison and streaming operators for base::Version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes mistake in previous patch set. Created 4 years, 11 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/common/chrome_content_client.cc ('k') | chrome/installer/setup/install_worker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/install.cc
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc
index 21855fe68e0df6f9e17206fd6d9fa06d74aab18c..a8660d36716ed36d2fa285ad49c7865422742f9e 100644
--- a/chrome/installer/setup/install.cc
+++ b/chrome/installer/setup/install.cc
@@ -211,7 +211,7 @@ installer::InstallStatus InstallNewVersion(
installer_state.UpdateStage(installer::ROLLINGBACK);
installer::InstallStatus result =
base::PathExists(new_chrome_exe) && current_version->get() &&
- new_version.Equals(*current_version->get()) ?
+ new_version == *current_version->get() ?
installer::SAME_VERSION_REPAIR_FAILED :
installer::INSTALL_FAILED;
LOG(ERROR) << "Install failed, rolling back... result: " << result;
@@ -225,28 +225,28 @@ installer::InstallStatus InstallNewVersion(
installer::RefreshElevationPolicy();
if (!current_version->get()) {
- VLOG(1) << "First install of version " << new_version.GetString();
+ VLOG(1) << "First install of version " << new_version;
return installer::FIRST_INSTALL_SUCCESS;
}
- if (new_version.Equals(**current_version)) {
- VLOG(1) << "Install repaired of version " << new_version.GetString();
+ if (new_version == **current_version) {
+ VLOG(1) << "Install repaired of version " << new_version;
return installer::INSTALL_REPAIRED;
}
- if (new_version.CompareTo(**current_version) > 0) {
+ if (new_version > **current_version) {
if (base::PathExists(new_chrome_exe)) {
- VLOG(1) << "Version updated to " << new_version.GetString()
- << " while running " << (*current_version)->GetString();
+ VLOG(1) << "Version updated to " << new_version
+ << " while running " << **current_version;
return installer::IN_USE_UPDATED;
}
- VLOG(1) << "Version updated to " << new_version.GetString();
+ VLOG(1) << "Version updated to " << new_version;
return installer::NEW_VERSION_UPDATED;
}
LOG(ERROR) << "Not sure how we got here while updating"
- << ", new version: " << new_version.GetString()
- << ", old version: " << (*current_version)->GetString();
+ << ", new version: " << new_version
+ << ", old version: " << **current_version;
return installer::INSTALL_FAILED;
}
« no previous file with comments | « chrome/common/chrome_content_client.cc ('k') | chrome/installer/setup/install_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698