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

Unified Diff: components/flags_ui/flags_state.cc

Issue 2182553002: Add other variations (with ids) for NTPSnippets to chrome://flags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Alexei's comment #5 + fix a bug Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/flags_ui/flags_state.h ('k') | components/flags_ui/flags_state_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/flags_ui/flags_state.cc
diff --git a/components/flags_ui/flags_state.cc b/components/flags_ui/flags_state.cc
index 4e2b73691733eb32bfaa2a8165676b063fec370a..c3d992b11b4b933272f07f7fff2af12f50948e26 100644
--- a/components/flags_ui/flags_state.cc
+++ b/components/flags_ui/flags_state.cc
@@ -436,11 +436,12 @@ void FlagsState::Reset() {
appended_switches_.clear();
}
-void FlagsState::RegisterAllFeatureVariationParameters(
+std::vector<std::string> FlagsState::RegisterAllFeatureVariationParameters(
FlagsStorage* flags_storage,
base::FeatureList* feature_list) {
std::set<std::string> enabled_entries;
GetSanitizedEnabledFlagsForCurrentPlatform(flags_storage, &enabled_entries);
+ std::vector<std::string> variation_ids;
for (size_t i = 0; i < num_feature_entries_; ++i) {
const FeatureEntry& e = feature_entries_[i];
@@ -460,10 +461,14 @@ void FlagsState::RegisterAllFeatureVariationParameters(
e.feature->name,
base::FeatureList::OverrideState::OVERRIDE_ENABLE_FEATURE,
field_trial);
+
+ if (variation && variation->variation_id)
+ variation_ids.push_back(variation->variation_id);
}
}
}
}
+ return variation_ids;
}
void FlagsState::GetFlagFeatureEntries(
« no previous file with comments | « components/flags_ui/flags_state.h ('k') | components/flags_ui/flags_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698