[go: nahoru, domu]

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

Issue 10576003: VariationsService now supports wildcard in min/max version (Closed)

Created:
8 years, 6 months ago by mathp
Modified:
8 years, 5 months ago
CC:
chromium-reviews, erikwright (departed), MAD, jar (doing other things), brettw-cc_chromium.org
Visibility:
Public.

Description

Supporting wildcards in max/min version specifications in VariationsService. 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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=145468

Patch Set 1 #

Total comments: 12

Patch Set 2 : Addressed initial comments #

Total comments: 14

Patch Set 3 : Second review addressed #

Patch Set 4 : Small fix #

Patch Set 5 : Added a check in VariationsService for validity of min/max versions. #

Patch Set 6 : Log statements. #

Total comments: 24

Patch Set 7 : Renaming #

Patch Set 8 : refactoring in version.cc #

Total comments: 10

Patch Set 9 : Fixed a typo #

Total comments: 5

Patch Set 10 : Addressed comments #

Total comments: 32

Patch Set 11 : Added test cases, addressed comments #

Total comments: 14

Patch Set 12 : Round of fixes #

Total comments: 6

Patch Set 13 : minor fixes #

Total comments: 2

Patch Set 14 : addressed brettw's comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+235 lines, -58 lines) Patch
M base/version.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +12 lines, -0 lines 0 comments Download
M base/version.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +113 lines, -34 lines 0 comments Download
M base/version_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +50 lines, -0 lines 0 comments Download
M chrome/browser/metrics/variations_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +14 lines, -8 lines 0 comments Download
M chrome/browser/metrics/variations_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +46 lines, -16 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
Alexei Svitkine (slow)
Here are some initial comments - mostly focused on code style. (By the way, you ...
8 years, 6 months ago (2012-06-18 22:03:44 UTC) #1
Mathieu
http://codereview.chromium.org/10576003/diff/1/base/version.cc File base/version.cc (right): http://codereview.chromium.org/10576003/diff/1/base/version.cc#newcode14 base/version.cc:14: namespace { On 2012/06/18 22:03:44, Alexei Svitkine wrote: > ...
8 years, 6 months ago (2012-06-19 14:30:20 UTC) #2
Alexei Svitkine (slow)
More comments for you! http://codereview.chromium.org/10576003/diff/6002/base/version.cc File base/version.cc (right): http://codereview.chromium.org/10576003/diff/6002/base/version.cc#newcode65 base/version.cc:65: if (version_str.at(version_str.length() - 1) != ...
8 years, 6 months ago (2012-06-19 14:53:17 UTC) #3
Mathieu
http://codereview.chromium.org/10576003/diff/6002/base/version.cc File base/version.cc (right): http://codereview.chromium.org/10576003/diff/6002/base/version.cc#newcode65 base/version.cc:65: if (version_str.at(version_str.length() - 1) != '*') { On 2012/06/19 ...
8 years, 6 months ago (2012-06-19 17:38:54 UTC) #4
Alexei Svitkine (slow)
I think you missed this part of my comments before: > Also, suggest renaming names ...
8 years, 6 months ago (2012-06-19 18:11:19 UTC) #5
Mathieu
http://codereview.chromium.org/10576003/diff/6002/base/version.h File base/version.h (right): http://codereview.chromium.org/10576003/diff/6002/base/version.h#newcode34 base/version.h:34: // can end with a wildcard character. On 2012/06/19 ...
8 years, 6 months ago (2012-06-19 18:29:06 UTC) #6
Alexei Svitkine (slow)
Looking much better. Here are some more meatier comments. http://codereview.chromium.org/10576003/diff/10005/base/version.cc File base/version.cc (right): http://codereview.chromium.org/10576003/diff/10005/base/version.cc#newcode20 base/version.cc:20: ...
8 years, 6 months ago (2012-06-19 18:30:26 UTC) #7
Mathieu
http://codereview.chromium.org/10576003/diff/10005/base/version.cc File base/version.cc (right): http://codereview.chromium.org/10576003/diff/10005/base/version.cc#newcode20 base/version.cc:20: bool ParseVersionNumbers(const std::vector<std::string>& numbers, On 2012/06/19 18:30:27, Alexei Svitkine ...
8 years, 6 months ago (2012-06-19 20:01:35 UTC) #8
Alexei Svitkine (slow)
More comments your way! Also, please run some try jobs so that we can see ...
8 years, 6 months ago (2012-06-21 21:00:53 UTC) #9
Alexei Svitkine (slow)
http://codereview.chromium.org/10576003/diff/22001/base/version.cc File base/version.cc (right): http://codereview.chromium.org/10576003/diff/22001/base/version.cc#newcode135 base/version.cc:135: for (size_t i = 0; i < parsed.size(); ++i) ...
8 years, 6 months ago (2012-06-22 05:24:21 UTC) #10
Mathieu
http://codereview.chromium.org/10576003/diff/16001/base/version.cc File base/version.cc (right): http://codereview.chromium.org/10576003/diff/16001/base/version.cc#newcode46 base/version.cc:46: // -1, 0 or 1 if comp2 is less ...
8 years, 6 months ago (2012-06-25 17:00:32 UTC) #11
Alexei Svitkine (slow)
One final round of comments / nits from me. http://codereview.chromium.org/10576003/diff/40001/base/version.cc File base/version.cc (right): http://codereview.chromium.org/10576003/diff/40001/base/version.cc#newcode16 base/version.cc:16: ...
8 years, 6 months ago (2012-06-26 18:22:03 UTC) #12
Alexei Svitkine (slow)
Also, please update the CL description for the new method name. Additionally, consider being a ...
8 years, 6 months ago (2012-06-26 18:29:10 UTC) #13
Ilya Sherman
Out of curiosity: Did you consider extending the semantics of the Version constructor to support ...
8 years, 6 months ago (2012-06-26 20:53:04 UTC) #14
Alexei Svitkine (slow)
On Tue, Jun 26, 2012 at 4:53 PM, <isherman@chromium.org> wrote: > Out of curiosity: Did ...
8 years, 6 months ago (2012-06-26 21:00:19 UTC) #15
Ilya Sherman
On 2012/06/26 21:00:19, Alexei Svitkine wrote: > On Tue, Jun 26, 2012 at 4:53 PM, ...
8 years, 6 months ago (2012-06-26 21:02:07 UTC) #16
Mathieu
http://codereview.chromium.org/10576003/diff/40001/base/version.cc File base/version.cc (right): http://codereview.chromium.org/10576003/diff/40001/base/version.cc#newcode16 base/version.cc:16: // This function parses the |numbers| vector representing the ...
8 years, 5 months ago (2012-06-27 15:40:06 UTC) #17
Alexei Svitkine (slow)
http://codereview.chromium.org/10576003/diff/50001/base/version.cc File base/version.cc (right): http://codereview.chromium.org/10576003/diff/50001/base/version.cc#newcode51 base/version.cc:51: // |components2|. Returns -1, 0 or 1 if |comp1| ...
8 years, 5 months ago (2012-06-27 15:47:59 UTC) #18
Ilya Sherman
http://codereview.chromium.org/10576003/diff/50001/base/version.cc File base/version.cc (right): http://codereview.chromium.org/10576003/diff/50001/base/version.cc#newcode22 base/version.cc:22: std::vector<uint16> *parsed) { nit: " *parsed" -> "* parsed" ...
8 years, 5 months ago (2012-06-27 17:16:42 UTC) #19
Mathieu
http://codereview.chromium.org/10576003/diff/40001/base/version.cc File base/version.cc (right): http://codereview.chromium.org/10576003/diff/40001/base/version.cc#newcode27 base/version.cc:27: for (std::vector<std::string>::const_iterator i = numbers.begin(); On 2012/06/26 20:53:04, Ilya ...
8 years, 5 months ago (2012-06-27 20:25:56 UTC) #20
Alexei Svitkine (slow)
LGTM with a few more nits. Adding brettw@ for base/ approval. http://codereview.chromium.org/10576003/diff/58001/base/version.cc File base/version.cc (right): ...
8 years, 5 months ago (2012-06-27 20:27:59 UTC) #21
Mathieu
http://codereview.chromium.org/10576003/diff/58001/base/version.cc File base/version.cc (right): http://codereview.chromium.org/10576003/diff/58001/base/version.cc#newcode97 base/version.cc:97: if (EndsWith(wildcard_string.c_str(), ".*", false)) { On 2012/06/27 20:28:00, Alexei ...
8 years, 5 months ago (2012-06-27 20:32:08 UTC) #22
Ilya Sherman
(lgtm too)
8 years, 5 months ago (2012-06-27 20:56:57 UTC) #23
brettw
owners LGTM, I didn't check the details. http://codereview.chromium.org/10576003/diff/61004/base/version.cc File base/version.cc (right): http://codereview.chromium.org/10576003/diff/61004/base/version.cc#newcode63 base/version.cc:63: for (size_t ...
8 years, 5 months ago (2012-07-03 19:45:28 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mathp@google.com/10576003/61004
8 years, 5 months ago (2012-07-04 15:08:32 UTC) #25
mathp
http://codereview.chromium.org/10576003/diff/61004/base/version.cc File base/version.cc (right): http://codereview.chromium.org/10576003/diff/61004/base/version.cc#newcode63 base/version.cc:63: for (size_t i = count; i < components1.size(); ++i) ...
8 years, 5 months ago (2012-07-04 15:16:29 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mathp@google.com/10576003/61007
8 years, 5 months ago (2012-07-04 15:16:41 UTC) #27
commit-bot: I haz the power
8 years, 5 months ago (2012-07-04 16:22:53 UTC) #28
Change committed as 145468

Powered by Google App Engine
This is Rietveld 408576698