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

Unified Diff: base/version.cc

Issue 7541015: Add a convenience function to Version (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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.h ('k') | base/version_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/version.cc
===================================================================
--- base/version.cc (revision 94719)
+++ base/version.cc (working copy)
@@ -45,6 +45,13 @@
return (!components_.empty());
}
+bool Version::IsOlderThan(const std::string& version_str) const {
+ Version proposed_ver(version_str);
+ if (!proposed_ver.IsValid())
+ return false;
+ return (CompareTo(proposed_ver) < 0);
+}
+
// TODO(cpu): remove this method.
Version* Version::GetVersionFromString(const std::string& version_str) {
Version* vers = new Version(version_str);
« no previous file with comments | « base/version.h ('k') | base/version_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698