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

Issue 2804633003: Add base::FeatureParam<> struct (Closed)

Created:
3 years, 8 months ago by sfiera
Modified:
3 years, 3 months ago
CC:
chromium-reviews, danakj+watch_chromium.org, noyau+watch_chromium.org, ntp-dev+reviews_chromium.org, asvitkine+watch_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add base::FeatureParam<> struct Bundles information for a struct into a single place: * Parameter name * Associated feature * Value type (string, bool, int, double, or enum) * Default value * For enum-valued parameters, the set of possible enum values and the associated strings On its own, this makes it easy to avoid certain kinds of errors (e.g. using a param with the wrong feature, type, or default value) because everything is declared together. It would also make it possible to infer more easily from the source whether a server-side configuration is valid. Review-Url: https://chromiumcodereview.appspot.com/2804633003 Cr-Commit-Position: refs/heads/master@{#503177} Committed: https://chromium.googlesource.com/chromium/src/+/01757be6de494235b94aad25b0d9b58e79382655

Patch Set 1 #

Patch Set 2 : Add const where windows requires it #

Patch Set 3 : Remove windows-incompatible constexpr #

Total comments: 10

Patch Set 4 : review #

Patch Set 5 : Better nocompile test #

Patch Set 6 : rebase #

Total comments: 12

Patch Set 7 : Tests #

Patch Set 8 : remove ntp_snippets part #

Patch Set 9 : Fix doc #

Patch Set 10 : Add enum class test #

Patch Set 11 : rebase #

Patch Set 12 : Remove constexpr for Windows #

Unified diffs Side-by-side diffs Delta from patch set Stats (+390 lines, -17 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M base/metrics/field_trial_params.h View 1 2 3 4 5 6 7 8 1 chunk +162 lines, -0 lines 0 comments Download
M base/metrics/field_trial_params.cc View 1 chunk +28 lines, -0 lines 0 comments Download
M base/metrics/field_trial_params_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +152 lines, -17 lines 0 comments Download
A base/metrics/field_trial_params_unittest.nc View 1 2 3 4 5 6 1 chunk +47 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (34 generated)
sfiera
Alexei, I've left a bunch of TODOs in field_trial_params.h that are mostly points to clarify ...
3 years, 8 months ago (2017-04-05 14:18:37 UTC) #4
Alexei Svitkine (slow)
Sorry for the review delay. https://codereview.chromium.org/2804633003/diff/40001/base/metrics/field_trial_params.cc File base/metrics/field_trial_params.cc (right): https://codereview.chromium.org/2804633003/diff/40001/base/metrics/field_trial_params.cc#newcode130 base/metrics/field_trial_params.cc:130: int FeatureParam<int>::Get() const { ...
3 years, 8 months ago (2017-04-24 18:35:48 UTC) #15
sfiera
I've added nocompile tests; you can check the error messages for misuse of the API ...
3 years, 7 months ago (2017-04-28 16:07:04 UTC) #16
Alexei Svitkine (slow)
I'm sorry I let this review stagnate for so long - I've been super busy ...
3 years, 4 months ago (2017-07-27 21:49:16 UTC) #21
sfiera
Just rebased this, but I haven't done any more work on it otherwise.
3 years, 4 months ago (2017-08-24 17:37:15 UTC) #22
Alexei Svitkine (slow)
Base code looks good % comment. I didn't finish reviewing all the downstream usage changes. ...
3 years, 4 months ago (2017-08-24 18:13:05 UTC) #23
sfiera
I've removed the ntp_snippets part—that was useful while writing it to make sure that the ...
3 years, 3 months ago (2017-08-25 11:56:17 UTC) #24
Alexei Svitkine (slow)
Sorry for the delay again. LGTM!
3 years, 3 months ago (2017-09-06 18:51:02 UTC) #29
sfiera
+gab for base/BUILD.gn This CL adds an additional no-compile test for base::FeatureParam<>.
3 years, 3 months ago (2017-09-20 08:49:17 UTC) #37
gab
On 2017/09/20 08:49:17, sfiera wrote: > +gab for base/BUILD.gn > > This CL adds an ...
3 years, 3 months ago (2017-09-20 16:30:19 UTC) #40
sfiera
Thanks! Farewell, Rietveld…
3 years, 3 months ago (2017-09-20 16:31:54 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2804633003/220001
3 years, 3 months ago (2017-09-20 16:32:09 UTC) #44
commit-bot: I haz the power
3 years, 3 months ago (2017-09-20 16:36:29 UTC) #47
Message was sent while issue was closed.
Committed patchset #12 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/01757be6de494235b94aad25b0d9...

Powered by Google App Engine
This is Rietveld 408576698