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

Issue 1541983003: Force all experiment enabled checks to use ExperimentalFeatures (Closed)

Created:
5 years ago by chasej
Modified:
4 years, 11 months ago
Reviewers:
iclelland, Rick Byers
CC:
chromium-reviews, blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Force all experiment enabled checks to use ExperimentalFeatures The original motivation for this CL was to add an overload to the isApiEnabled() method, without an error message. Like ExecutionContext.isSecureContext(), this allows callers to check for enabled experiments, but not pass an error message parameter, which would be ignored. In adding the overload, it was determined that all callers should be using the ExperimentalFeatures generated class (with the exception of unit tests). As a result, the Experiments class now just provides a private implementation of the enabled check. Callers use the ExperimentalFeatures class for the integrated check of runtime-enabled + appropriate API key. The motivation for this change was this CL to add the [ExperimentEnabled] IDL attribute: https://codereview.chromium.org/1531443003 BUG=551609 Committed: https://crrev.com/707a221a0a22c5a376dcb7979367b4ee1c314f77 Cr-Commit-Position: refs/heads/master@{#368471}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Rebase #

Patch Set 3 : Generated code uses private implementation method #

Patch Set 4 : Fix link error under GN and rename entry method #

Total comments: 9

Patch Set 5 : Update comments to explain class design and code generation #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -25 lines) Patch
M third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.h.tmpl View 1 chunk +8 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/BUILD.gn View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/experiments/Experiments.h View 1 2 3 4 2 chunks +11 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/experiments/Experiments.cpp View 1 2 3 3 chunks +18 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/experiments/ExperimentsTest.cpp View 1 2 3 6 chunks +29 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/experiments/testing/InternalsFrobulate.cpp View 1 2 1 chunk +2 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 2 chunks +9 lines, -1 line 1 comment Download

Messages

Total messages: 23 (6 generated)
chasej
iclelland, rbyers, please take a look. This is a followup to iclelland's CL: https://codereview.chromium.org/1538663003/ rbyers, ...
5 years ago (2015-12-22 21:11:54 UTC) #2
iclelland
https://codereview.chromium.org/1541983003/diff/1/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl File third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl (right): https://codereview.chromium.org/1541983003/diff/1/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl#newcode32 third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl:32: if (errorMessage) { See the comment in Experiments.cpp -- ...
5 years ago (2015-12-23 03:56:12 UTC) #3
chasej
https://codereview.chromium.org/1541983003/diff/1/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl File third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl (right): https://codereview.chromium.org/1541983003/diff/1/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl#newcode32 third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl:32: if (errorMessage) { On 2015/12/23 03:56:12, iclelland wrote: > ...
5 years ago (2015-12-23 15:58:24 UTC) #4
iclelland
On 2015/12/23 15:58:24, chasej wrote: > https://codereview.chromium.org/1541983003/diff/1/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl > File > third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl > (right): > > ...
4 years, 11 months ago (2016-01-05 16:02:25 UTC) #5
Rick Byers
On 2016/01/05 16:02:25, iclelland wrote: > On 2015/12/23 15:58:24, chasej wrote: > > > https://codereview.chromium.org/1541983003/diff/1/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl ...
4 years, 11 months ago (2016-01-05 16:51:29 UTC) #6
iclelland
https://codereview.chromium.org/1541983003/diff/60001/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl File third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl (right): https://codereview.chromium.org/1541983003/diff/60001/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl#newcode23 third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl:23: {% endfor %} Why the separate loop? Couldn't the ...
4 years, 11 months ago (2016-01-08 15:11:28 UTC) #7
chasej
https://codereview.chromium.org/1541983003/diff/60001/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl File third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl (right): https://codereview.chromium.org/1541983003/diff/60001/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl#newcode23 third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl:23: {% endfor %} On 2016/01/08 15:11:28, iclelland wrote: > ...
4 years, 11 months ago (2016-01-08 17:37:06 UTC) #9
iclelland
https://codereview.chromium.org/1541983003/diff/60001/third_party/WebKit/Source/core/experiments/Experiments.cpp File third_party/WebKit/Source/core/experiments/Experiments.cpp (right): https://codereview.chromium.org/1541983003/diff/60001/third_party/WebKit/Source/core/experiments/Experiments.cpp#newcode48 third_party/WebKit/Source/core/experiments/Experiments.cpp:48: if (errorMessage) { On 2016/01/08 17:37:06, chasej wrote: > ...
4 years, 11 months ago (2016-01-08 17:50:10 UTC) #10
iclelland
Everything else is minor style quibbles, I think. This LGTM, whichever way they're resolved. https://codereview.chromium.org/1541983003/diff/60001/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl ...
4 years, 11 months ago (2016-01-08 17:59:38 UTC) #11
chasej
On 2016/01/08 17:50:10, iclelland wrote: > https://codereview.chromium.org/1541983003/diff/60001/third_party/WebKit/Source/core/experiments/Experiments.cpp > File third_party/WebKit/Source/core/experiments/Experiments.cpp (right): > > https://codereview.chromium.org/1541983003/diff/60001/third_party/WebKit/Source/core/experiments/Experiments.cpp#newcode48 > ...
4 years, 11 months ago (2016-01-08 18:15:05 UTC) #12
chasej
rbyers, please take a look. Ian and I have reached consensus on this CL, so ...
4 years, 11 months ago (2016-01-08 18:17:57 UTC) #13
Rick Byers
LGTM with nit https://codereview.chromium.org/1541983003/diff/80001/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in File third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in (right): https://codereview.chromium.org/1541983003/diff/80001/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in#newcode23 third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in:23: // api_name=API_NAME is used to integrate ...
4 years, 11 months ago (2016-01-08 21:20:34 UTC) #15
chasej
On 2016/01/08 21:20:34, Rick Byers wrote: > LGTM with nit > > https://codereview.chromium.org/1541983003/diff/80001/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in > File ...
4 years, 11 months ago (2016-01-08 21:43:00 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1541983003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1541983003/80001
4 years, 11 months ago (2016-01-08 21:46:02 UTC) #18
Rick Byers
On 2016/01/08 21:43:00, chasej wrote: > On 2016/01/08 21:20:34, Rick Byers wrote: > > LGTM ...
4 years, 11 months ago (2016-01-08 21:47:04 UTC) #19
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 11 months ago (2016-01-09 00:36:40 UTC) #21
commit-bot: I haz the power
4 years, 11 months ago (2016-01-09 00:37:37 UTC) #23
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/707a221a0a22c5a376dcb7979367b4ee1c314f77
Cr-Commit-Position: refs/heads/master@{#368471}

Powered by Google App Engine
This is Rietveld 408576698