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

Unified Diff: chrome/browser/component_updater/pnacl_component_installer.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
Index: chrome/browser/component_updater/pnacl_component_installer.cc
diff --git a/chrome/browser/component_updater/pnacl_component_installer.cc b/chrome/browser/component_updater/pnacl_component_installer.cc
index 93b2611340aed7989c46ff4d87528f4661a3ed95..6c47ea134938b94bc6d0810a7978befc210a0139 100644
--- a/chrome/browser/component_updater/pnacl_component_installer.cc
+++ b/chrome/browser/component_updater/pnacl_component_installer.cc
@@ -77,8 +77,9 @@ volatile base::subtle::Atomic32 needs_on_demand_update = 0;
void CheckVersionCompatiblity(const base::Version& current_version) {
// Using NoBarrier, since needs_on_demand_update is standalone and does
// not have other associated data.
- base::subtle::NoBarrier_Store(&needs_on_demand_update,
- current_version.IsOlderThan(kMinPnaclVersion));
+ base::subtle::NoBarrier_Store(
+ &needs_on_demand_update,
+ current_version < base::Version(kMinPnaclVersion));
}
// PNaCl is packaged as a multi-CRX. This returns the platform-specific
@@ -272,7 +273,7 @@ bool PnaclComponentInstaller::Install(const base::DictionaryValue& manifest,
// |installed_file| actually exists.
bool PnaclComponentInstaller::GetInstalledFile(const std::string& file,
base::FilePath* installed_file) {
- if (current_version().Equals(Version(kNullVersion)))
+ if (current_version() == Version(kNullVersion))
return false;
*installed_file = GetPnaclBaseDirectory()
@@ -339,7 +340,7 @@ void StartPnaclUpdateRegistration(
!CheckPnaclComponentManifest(*manifest,
*pnacl_manifest,
&manifest_version) ||
- !current_version.Equals(manifest_version)) {
+ current_version != manifest_version) {
current_version = Version(kNullVersion);
} else {
OverrideDirPnaclComponent(path);
« no previous file with comments | « chrome/app/chrome_crash_reporter_client.cc ('k') | chrome/browser/extensions/chrome_extensions_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698