summaryrefslogtreecommitdiffstats
path: root/base/version_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove two deprecated methods from base::Versionisherman@chromium.org2012-07-111-11/+10
| | | | | | | | | | BUG=none TEST=none TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/10683005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146157 0039d316-1c4b-4281-b951-d872f2087c98
* Supporting wildcards in max/min version specifications in VariationsService.mathp@google.com2012-07-041-1/+51
| | | | | | | | | | | | | | | | Adds a method CompareToWildcardString that will return -1/0/1, similar to CompareTo, when a version is smaller, equal to or greater than a wildcard string such as "1.2.*". Added a method IsValidWildcardString that validates the format of a wildcard string, and slightly refactored the Version class to avoid code duplication. For example, CompareToWildcardString and CompareTo share the new method CompareVersionComponents. BUG=127077 TEST=See tests for VariationsService, Version Review URL: https://chromiumcodereview.appspot.com/10576003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145468 0039d316-1c4b-4281-b951-d872f2087c98
* Add a convenience function to Versioncpu@chromium.org2011-08-011-0/+2
| | | | | | | | | | Came up as in item in a component updater review. It is a common pattern used in extension updater and component updater. TEST=included BUG=none Review URL: http://codereview.chromium.org/7541015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94928 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up base/Versioncpu@chromium.org2011-06-071-2/+16
| | | | | | | | | | | | | | | | | It turns out base/Version is really a value object but probably because of some serious accident or by the machinations of a super villain, forgot his identity and now it thinks is a reference object, only creatable in the heap and that could only spawn offsprings via cloning. But fear not 'cause I've seen Version true nature; At its core is just a good 'ol vector<uint16>, which has very respectable value semantics. Also I have removed the is_valid_ parasite as much as I could. The old interface (GetVersionFromString and Clone) is kept so existing callers would not need to be modified. BUG=none TEST=included Review URL: http://codereview.chromium.org/7105008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88143 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed bug where an empty version string is considered valid.akalin@chromium.org2010-03-251-6/+19
| | | | | | | | | | | | Made default constructor public, but DCHECK() on any use of a default-constructed object. BUG=none TEST=unittests Review URL: http://codereview.chromium.org/1364002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42681 0039d316-1c4b-4281-b951-d872f2087c98
* Add a Version class and matching unit tests, roughly based on ↵erikkay@google.com2009-01-291-0/+62
chrome/installer/util/version.*. This version has more flexible parsing rules and is more robust to detecting bogus versions, supporting arbitrary numbers of version components rather than just dotted quads. It's possible that we should switch chrome installer to use this version. Review URL: http://codereview.chromium.org/19667 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8901 0039d316-1c4b-4281-b951-d872f2087c98