Show all experiments, even those that are unavailable on the current platform
BUG=53560
TEST=Go to about:flags, check that all experiments are shown, with a list of the platforms where each one can run.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=115054
http://codereview.chromium.org/8898039/diff/12008/chrome/browser/about_flags.cc File chrome/browser/about_flags.cc (right): http://codereview.chromium.org/8898039/diff/12008/chrome/browser/about_flags.cc#newcode664 chrome/browser/about_flags.cc:664: } Wouldn't that append all four platforms to every ...
http://codereview.chromium.org/8898039/diff/12008/chrome/browser/about_flags.cc
File chrome/browser/about_flags.cc (right):
http://codereview.chromium.org/8898039/diff/12008/chrome/browser/about_flags....
chrome/browser/about_flags.cc:664: }
On 2011/12/16 21:18:11, tbreisacher wrote:
> Wouldn't that append all four platforms to every single experiment? We want to
> only show the platform(s) where this particular experiment is available. I'm
not
> sure how to do this more clearly.
Ah, right. Either write the function you have above with a switch and do
for (int platforms = experiment.supported_platforms; platforms; platforms &=
platforms - 1)
supported_platforms->Append(new StringValue(NameForPlatform(platform &
-platform)));
(which I suppose is a bit hard to read) or do
void AddOsStrings(bitmask, list) {
struct { int bit, const char str[] } kBitsToOs = {
...
}
for (int i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
if (bitmask & kBitsToOs[i].bit)
list->Append(new StringValue(kBitsToOs[i].str)
}
and call that from here
I like the second approach, since it also reduces the number of nested loops in
GetFlagsExperimentData
Tyler Breisacher (Chromium)
http://codereview.chromium.org/8898039/diff/24002/chrome/browser/about_flags.cc File chrome/browser/about_flags.cc (right): http://codereview.chromium.org/8898039/diff/24002/chrome/browser/about_flags.cc#newcode48 chrome/browser/about_flags.cc:48: const char str[10]; This "10" is super ugly. Without ...
Almost there, just some final nits :-) http://codereview.chromium.org/8898039/diff/24002/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): http://codereview.chromium.org/8898039/diff/24002/chrome/app/generated_resources.grd#newcode4603 chrome/app/generated_resources.grd:4603: <message name="IDS_FLAGS_NOT_SUPPORTED" ...
http://codereview.chromium.org/8898039/diff/24002/chrome/app/generated_resour...
File chrome/app/generated_resources.grd (right):
http://codereview.chromium.org/8898039/diff/24002/chrome/app/generated_resour...
chrome/app/generated_resources.grd:4603: <message name="IDS_FLAGS_NOT_SUPPORTED"
desc="Shown instead of the Enable/Disable link, to let the user know that an
experiment is not supported on the current platform.">
On 2011/12/17 03:34:27, Nico wrote:
> NOT_AVAILABLE? also in desc
Done.
http://codereview.chromium.org/8898039/diff/24002/chrome/browser/about_flags.cc
File chrome/browser/about_flags.cc (right):
http://codereview.chromium.org/8898039/diff/24002/chrome/browser/about_flags....
chrome/browser/about_flags.cc:45: void AddOsStrings(unsigned bitmask, ListValue*
list) {
On 2011/12/17 03:34:27, Nico wrote:
> Needs a very short comment above it describing what it does
Done. Although writing the comment is making me think it might be clearer if
this function takes the Experiment, rather than the bitmask. What do you think?
http://codereview.chromium.org/8898039/diff/24002/chrome/browser/about_flags....
chrome/browser/about_flags.cc:48: const char str[10];
On 2011/12/17 03:34:27, Nico wrote:
> On 2011/12/17 03:29:01, tbreisacher wrote:
> > This "10" is super ugly. Without it, I get a compiler error:
> "initializer-string
> > for array of chars is too long". There has to be a less hacky way to fix
that,
> > right?
>
> const char* const str
>
> Also, "name" is probably better than "str", I was in pseudo-code-typing mode
Done.
http://codereview.chromium.org/8898039/diff/24002/chrome/browser/about_flags....
chrome/browser/about_flags.cc:55: for (unsigned i = 0; i <
ARRAYSIZE_UNSAFE(kBitsToOs); ++i)
On 2011/12/17 03:34:27, Nico wrote:
> does "int" not work?
chrome/browser/about_flags.cc:59: error: comparison between signed and unsigned
integer expressions
Although, the ARRAYSIZE_UNSAFE documentation says it returns a |size_t| not an
|unsigned| so it's probably better to declare it as size_t.
http://codereview.chromium.org/8898039/diff/24002/chrome/browser/resources/fl...
File chrome/browser/resources/flags.css (right):
http://codereview.chromium.org/8898039/diff/24002/chrome/browser/resources/fl...
chrome/browser/resources/flags.css:106: .experiment-unsupported > td {
On 2011/12/17 03:34:27, Nico wrote:
> I wonder if this should be
>
> .experiment-disabled > td,
> .experiment-unsupported > td {
> ...
> }
>
> That way the bodies aren't duplicated.
Sure, I don't see why not. If someone decides later to make them look different,
they can always re-split them. Done.
Nico
lgtm, but maybe change the name too http://codereview.chromium.org/8898039/diff/24002/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): http://codereview.chromium.org/8898039/diff/24002/chrome/app/generated_resources.grd#newcode4603 chrome/app/generated_resources.grd:4603: <message name="IDS_FLAGS_NOT_SUPPORTED" ...
Presubmit check for 8898039-24004 failed and returned exit status 1.
Running presubmit commit checks ...
** Presubmit Messages **
If this change requires manual test instructions to QA team, add
TEST=[instructions].
** Presubmit ERRORS **
Missing LGTM from an OWNER for:
chrome/browser/resources/flags.css,chrome/browser/resources/flags.js,chrome/browser/resources/flags.html
Tyler Breisacher (Chromium)
OWNERS are arv, jhawkins, and estade. Can one of you take a look at this ...
On 2011/12/17 23:50:57, tbreisacher wrote:
> OWNERS are arv, jhawkins, and estade. Can one of you take a look at this
please?
In the future please don't add more than one OWNER for review at a time.
James Hawkins
http://codereview.chromium.org/8898039/diff/24004/chrome/browser/resources/flags.html File chrome/browser/resources/flags.html (right): http://codereview.chromium.org/8898039/diff/24004/chrome/browser/resources/flags.html#newcode75 chrome/browser/resources/flags.html:75: i18n-content="flagsNotSupported">NOT AVAILABLE ON THIS PLATFORM I don't think you ...
http://codereview.chromium.org/8898039/diff/24004/chrome/browser/resources/flags.html#newcode75 > chrome/browser/resources/flags.html:75: i18n-content="flagsNotSupported">NOT > AVAILABLE ON THIS PLATFORM > I don't think you meant ...
http://codereview.chromium.org/8898039/diff/24004/chrome/browser/resources/fl...
> chrome/browser/resources/flags.html:75: i18n-content="flagsNotSupported">NOT
> AVAILABLE ON THIS PLATFORM
> I don't think you meant to leave in the inner text content here.
I was following the example of what is done elsewhere in the same file. I assume
that's so you can load the HTML directly without building the whole browser, to
quickly see the structure and styling of the page.
James Hawkins
http://codereview.chromium.org/8898039/diff/24004/chrome/browser/resources/flags.html File chrome/browser/resources/flags.html (right): http://codereview.chromium.org/8898039/diff/24004/chrome/browser/resources/flags.html#newcode75 chrome/browser/resources/flags.html:75: i18n-content="flagsNotSupported">NOT AVAILABLE ON THIS PLATFORM On 2011/12/18 00:01:59, James ...
> Please remove this one.
>
> The content of the resources should match what we ship (and no more).
Building
> doesn't take that long, and if it does take too long, we should fix that.
That makes sense. Done.
Issue 8898039: Show all experiments, even those that are unavailable on the current platform
(Closed)
Created 9 years ago by Tyler Breisacher (Chromium)
Modified 9 years ago
Reviewers: Peter Beverloo, Nico, Evan Stade, James Hawkins
Base URL: http://git.chromium.org/chromium/src.git@master
Comments: 31