|
|
Chromium Code Reviews|
Created:
4 years, 6 months ago by jkrcal Modified:
4 years, 6 months ago Reviewers:
Marc Treib CC:
chromium-reviews, dzhioev+watch_chromium.org, achuith+watch_chromium.org, davemoore+watch_chromium.org, asvitkine+watch_chromium.org, oshima+watch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@about-flags-parameters Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionPreset variation parameters for NTPSnippets feature.
The CL uses the new FeatureEntry::FEATURE_WITH_VARIATIONS_VALUE type. It gives users more options for the NTPSnippets feature to choose from in chrome://flags.
BUG=606320
Committed: https://crrev.com/b050f1526d5016e5e70d72682f4bb64b5ec2d50f
Cr-Commit-Position: refs/heads/master@{#401020}
Patch Set 1 #Patch Set 2 : Minor polish #Patch Set 3 : Minor polish #2 #Patch Set 4 : Changing the presets #Patch Set 5 : Rebase #
Total comments: 4
Patch Set 6 : After code review #
Total comments: 5
Patch Set 7 : After code review #2 #Patch Set 8 : After code review #3 #Patch Set 9 : Rebase #2 #Patch Set 10 : Minor polish #3 #Patch Set 11 : Minor polish #4 #Patch Set 12 : Removing unittests that test non-default behaviour #
Messages
Total messages: 35 (15 generated)
Description was changed from ========== Preset variation parameters for NTPSnippets feature. Uses the new FeatureEntry::FEATURE_WITH_VARIATIONS_VALUE type. BUG=606320 ========== to ========== Preset variation parameters for NTPSnippets feature. The CL uses the new FeatureEntry::FEATURE_WITH_VARIATIONS_VALUE type. It gives users more options for the NTPSnippets feature to choose from in chrome://flags. BUG=606320 ==========
jkrcal@chromium.org changed reviewers: + treib@chromium.org
PTAL
https://codereview.chromium.org/2041783002/diff/80001/chrome/browser/about_fl... File chrome/browser/about_flags.cc (right): https://codereview.chromium.org/2041783002/diff/80001/chrome/browser/about_fl... chrome/browser/about_flags.cc:524: const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationOnlyTopSites[] = { I find "TopSites" misleading here - we don't even use TopSites so far. I'd just call this somewith with "HostRestrict" probably. https://codereview.chromium.org/2041783002/diff/80001/chrome/browser/about_fl... chrome/browser/about_flags.cc:530: {"fetching_personalization", "non_personal"}, This seems wrong; should probably be "personal"?
Thanks! PTAL, again. https://codereview.chromium.org/2041783002/diff/80001/chrome/browser/about_fl... File chrome/browser/about_flags.cc (right): https://codereview.chromium.org/2041783002/diff/80001/chrome/browser/about_fl... chrome/browser/about_flags.cc:524: const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationOnlyTopSites[] = { On 2016/06/17 12:34:13, Marc Treib wrote: > I find "TopSites" misleading here - we don't even use TopSites so far. I'd just > call this somewith with "HostRestrict" probably. Done. https://codereview.chromium.org/2041783002/diff/80001/chrome/browser/about_fl... chrome/browser/about_flags.cc:530: {"fetching_personalization", "non_personal"}, On 2016/06/17 12:34:13, Marc Treib wrote: > This seems wrong; should probably be "personal"? Done. (Huh, I had yet another mistake there compared to the specification in crbug.com/606320.)
https://codereview.chromium.org/2041783002/diff/100001/chrome/browser/about_f... File chrome/browser/about_flags.cc (right): https://codereview.chromium.org/2041783002/diff/100001/chrome/browser/about_f... chrome/browser/about_flags.cc:518: {"fetching_host_restrict", "off"}, Hm, the "Default" variant should probably not list any parameters? We already have default values in the code for when the params are unset. Let's try to keep the number of (potentially) different "defaults" to a minimum :) https://codereview.chromium.org/2041783002/diff/100001/chrome/browser/about_f... chrome/browser/about_flags.cc:536: {"", kNTPSnippetsFeatureVariationDefault, 2}, The "2"s here are for the number of parameters? Setting that explicitly seems error-prone... but I don't see a good way of avoiding it.
PTAL, again. https://codereview.chromium.org/2041783002/diff/100001/chrome/browser/about_f... File chrome/browser/about_flags.cc (right): https://codereview.chromium.org/2041783002/diff/100001/chrome/browser/about_f... chrome/browser/about_flags.cc:518: {"fetching_host_restrict", "off"}, On 2016/06/17 13:43:54, Marc Treib wrote: > Hm, the "Default" variant should probably not list any parameters? We already > have default values in the code for when the params are unset. Let's try to keep > the number of (potentially) different "defaults" to a minimum :) Good point, done. (I had actually to change the defaults in the code to match what was here.) https://codereview.chromium.org/2041783002/diff/100001/chrome/browser/about_f... chrome/browser/about_flags.cc:536: {"", kNTPSnippetsFeatureVariationDefault, 2}, On 2016/06/17 13:43:54, Marc Treib wrote: > The "2"s here are for the number of parameters? Setting that explicitly seems > error-prone... but I don't see a good way of avoiding it. I do not see it either as it is all statically defined. (On the other hand, I am far from being a c++ guru, so feel free to prove me wrong! :)
LGTM, thanks! https://codereview.chromium.org/2041783002/diff/100001/chrome/browser/about_f... File chrome/browser/about_flags.cc (right): https://codereview.chromium.org/2041783002/diff/100001/chrome/browser/about_f... chrome/browser/about_flags.cc:536: {"", kNTPSnippetsFeatureVariationDefault, 2}, On 2016/06/17 14:13:43, jkrcal wrote: > On 2016/06/17 13:43:54, Marc Treib wrote: > > The "2"s here are for the number of parameters? Setting that explicitly seems > > error-prone... but I don't see a good way of avoiding it. > > I do not see it either as it is all statically defined. > (On the other hand, I am far from being a c++ guru, so feel free to prove me > wrong! :) Well, there's an arraysize() macro (in base/macros.h) which might be a bit nicer than explicitly stating the number. It's not perfect because then you have to spell the name twice. Alternatively, it might be possible to do something with std::array, but a) I'm not familiar enough with that to say for sure, and b) I'm not even sure it'd be worth the effort. So I'd probably just go with arraysize. Ultimately your call though; anyway it should be pretty easy to diagnose if you specify a wrong number.
The CQ bit was checked by jkrcal@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from treib@chromium.org Link to the patchset: https://codereview.chromium.org/2041783002/#ps140001 (title: "After code review #3")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2041783002/140001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-device on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-device-gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-gn/bui...) ios-simulator on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) ios-simulator-gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-gn/...) mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
The CQ bit was checked by jkrcal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2041783002/180001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by jkrcal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2041783002/200001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-simulator-gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-gn/...)
The CQ bit was checked by jkrcal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2041783002/220001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by jkrcal@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from treib@chromium.org Link to the patchset: https://codereview.chromium.org/2041783002/#ps220001 (title: "Removing unittests that test non-default behaviour")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2041783002/220001
Message was sent while issue was closed.
Description was changed from ========== Preset variation parameters for NTPSnippets feature. The CL uses the new FeatureEntry::FEATURE_WITH_VARIATIONS_VALUE type. It gives users more options for the NTPSnippets feature to choose from in chrome://flags. BUG=606320 ========== to ========== Preset variation parameters for NTPSnippets feature. The CL uses the new FeatureEntry::FEATURE_WITH_VARIATIONS_VALUE type. It gives users more options for the NTPSnippets feature to choose from in chrome://flags. BUG=606320 ==========
Message was sent while issue was closed.
Committed patchset #12 (id:220001)
Message was sent while issue was closed.
Description was changed from ========== Preset variation parameters for NTPSnippets feature. The CL uses the new FeatureEntry::FEATURE_WITH_VARIATIONS_VALUE type. It gives users more options for the NTPSnippets feature to choose from in chrome://flags. BUG=606320 ========== to ========== Preset variation parameters for NTPSnippets feature. The CL uses the new FeatureEntry::FEATURE_WITH_VARIATIONS_VALUE type. It gives users more options for the NTPSnippets feature to choose from in chrome://flags. BUG=606320 Committed: https://crrev.com/b050f1526d5016e5e70d72682f4bb64b5ec2d50f Cr-Commit-Position: refs/heads/master@{#401020} ==========
Message was sent while issue was closed.
Patchset 12 (id:??) landed as https://crrev.com/b050f1526d5016e5e70d72682f4bb64b5ec2d50f Cr-Commit-Position: refs/heads/master@{#401020}
Message was sent while issue was closed.
Marc, FYI I changed it to the arraysize macro. I also removed two unittests for the fetcher that relied on host_restriction being "on". I will put the unittests back once we have code to set the parameters values in unittests.
Message was sent while issue was closed.
On 2016/06/21 17:25:56, jkrcal wrote: > Marc, FYI I changed it to the arraysize macro. > I also removed two unittests for the fetcher that relied on host_restriction > being "on". I will put the unittests back once we have code to set the > parameters values in unittests. From Chris' reply on the mail thread, it seems there is already some way to force variation params in tests?
Message was sent while issue was closed.
On 2016/06/21 18:59:35, Marc Treib wrote: > On 2016/06/21 17:25:56, jkrcal wrote: > > Marc, FYI I changed it to the arraysize macro. > > I also removed two unittests for the fetcher that relied on host_restriction > > being "on". I will put the unittests back once we have code to set the > > parameters values in unittests. > > From Chris' reply on the mail thread, it seems there is already some way to > force variation params in tests? I wanted to wait until the CL of Chris lands. I'll put the unittests back early next week. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
