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

Issue 7105008: Clean up base/Version (Closed)

Created:
9 years, 6 months ago by cpu%chromium.org
Modified:
9 years, 6 months ago
CC:
chromium-reviews, Paweł Hajdan Jr., brettw-cc_chromium.org
Visibility:
Public.

Description

Clean up base/Version 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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=88143

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 3

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -61 lines) Patch
M base/version.h View 1 2 3 2 chunks +13 lines, -15 lines 0 comments Download
M base/version.cc View 1 2 3 4 5 6 3 chunks +41 lines, -44 lines 0 comments Download
M base/version_unittest.cc View 1 2 3 4 5 2 chunks +16 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
cpu_(ooo_6.6-7.5)
9 years, 6 months ago (2011-06-01 02:48:16 UTC) #1
brettw
I don't really get this. Why not just make a Version(std::string) and have no default ...
9 years, 6 months ago (2011-06-01 07:28:17 UTC) #2
cpu_(ooo_6.6-7.5)
On 2011/06/01 07:28:17, brettw wrote: > I don't really get this. Why not just make ...
9 years, 6 months ago (2011-06-01 21:07:06 UTC) #3
brettw
Can't you put something in a vector that doesn't have a default constructor? I'd rather ...
9 years, 6 months ago (2011-06-02 08:34:31 UTC) #4
cpu_(ooo_6.6-7.5)
On 2011/06/02 08:34:31, brettw wrote: > Can't you put something in a vector that doesn't ...
9 years, 6 months ago (2011-06-06 22:18:24 UTC) #5
Evan Martin
http://codereview.chromium.org/7105008/diff/6001/base/version.cc File base/version.cc (right): http://codereview.chromium.org/7105008/diff/6001/base/version.cc#newcode21 base/version.cc:21: // TODO: remove this method. TODO(cpu) or file a ...
9 years, 6 months ago (2011-06-06 23:35:13 UTC) #6
cpu_(ooo_6.6-7.5)
All changes made. Please look again.
9 years, 6 months ago (2011-06-07 00:55:05 UTC) #7
Evan Martin
9 years, 6 months ago (2011-06-07 03:06:26 UTC) #8
LGTM

Powered by Google App Engine
This is Rietveld 408576698