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

Issue 1364002: Fixed bug where an empty version string is considered valid. (Closed)

Created:
10 years, 9 months ago by akalin
Modified:
9 years, 7 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Fixed bug where an empty version string is considered valid. Made default constructor public, but DCHECK() on any use of a default-constructed object. BUG=none TEST=unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=42681

Patch Set 1 #

Patch Set 2 : Cleaned up includes #

Total comments: 12

Patch Set 3 : addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -18 lines) Patch
M base/version.h View 3 chunks +11 lines, -1 line 0 comments Download
M base/version.cc View 1 2 4 chunks +23 lines, -11 lines 0 comments Download
M base/version_unittest.cc View 1 2 3 chunks +19 lines, -6 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
akalin
+erikkay for review
10 years, 9 months ago (2010-03-25 20:35:15 UTC) #1
Erik does not do reviews
LGTM http://codereview.chromium.org/1364002/diff/2001/3001 File base/version.cc (right): http://codereview.chromium.org/1364002/diff/2001/3001#newcode75 base/version.cc:75: if (numbers.empty()) { nit: remove {}
10 years, 9 months ago (2010-03-25 20:43:29 UTC) #2
Scott Hess - ex-Googler
lgtm, minor nits. http://codereview.chromium.org/1364002/diff/2001/3001 File base/version.cc (right): http://codereview.chromium.org/1364002/diff/2001/3001#newcode7 base/version.cc:7: #include <vector> vector is already in ...
10 years, 9 months ago (2010-03-25 20:47:29 UTC) #3
akalin
All comments done, submitting when trybots go green http://codereview.chromium.org/1364002/diff/2001/3001 File base/version.cc (right): http://codereview.chromium.org/1364002/diff/2001/3001#newcode7 base/version.cc:7: #include ...
10 years, 9 months ago (2010-03-25 21:02:38 UTC) #4
akalin
10 years, 9 months ago (2010-03-25 21:41:20 UTC) #5
trybots are acting up, but it looks like base_unittests is compiling/passing and
the errors are unrelated.  Submitting...

On 2010/03/25 21:02:38, akalin wrote:
> All comments done, submitting when trybots go green
> 
> http://codereview.chromium.org/1364002/diff/2001/3001
> File base/version.cc (right):
> 
> http://codereview.chromium.org/1364002/diff/2001/3001#newcode7
> base/version.cc:7: #include <vector>
> removed.
> 
> On 2010/03/25 20:47:29, shess wrote:
> > vector is already in version.h
> 
> http://codereview.chromium.org/1364002/diff/2001/3001#newcode38
> base/version.cc:38: DCHECK(is_valid_);
> On 2010/03/25 20:47:29, shess wrote:
> > perhaps DCHECK(other.is_valid_);
> 
> Done.
> 
> http://codereview.chromium.org/1364002/diff/2001/3001#newcode39
> base/version.cc:39: std::vector<uint16> other_components = other.components();
> Yeah, that copy has always been unnecessary.  Changed to use other.components_
> directly.
> 
> On 2010/03/25 20:47:29, shess wrote:
> > Any complaints about const std::vector<uint16>& while you're in here?  I
think
> > that will remove the need to copy the vector (not that it's a huge issue).
> 
> http://codereview.chromium.org/1364002/diff/2001/3001#newcode75
> base/version.cc:75: if (numbers.empty()) {
> On 2010/03/25 20:43:29, Erik Kay wrote:
> > nit: remove {}
> 
> Done.
> 
> http://codereview.chromium.org/1364002/diff/2001/3001#newcode77
> base/version.cc:77: }
> On 2010/03/25 20:47:29, shess wrote:
> > Style of this file seems to be no braces for one-line if() clause.
> 
> Done.
> 
> http://codereview.chromium.org/1364002/diff/2001/3003
> File base/version_unittest.cc (right):
> 
> http://codereview.chromium.org/1364002/diff/2001/3003#newcode23
> base/version_unittest.cc:23: {"", 0, false},
> On 2010/03/25 20:47:29, shess wrote:
> > Add some variants on empty, like a space.  Those will be handled by the
> existing
> > code, but while you're here...
> 
> Done.

Powered by Google App Engine
This is Rietveld 408576698